Support #1716

converting by python code

Added by Dang Viet Tan over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:02/26/2016
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

Dear the system admin

Hi, my name is Tan. I have a question.
Can it possible to convert a CEL coordinate value to GAL coordinate value by python code? If possible, how can I use it?

Thank you for reading me.
Tan


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 8 years ago

  • Status changed from New to Feedback
  • Assigned To set to Knödlseder Jürgen

The answer is yes.

See http://cta.irap.omp.eu/gammalib/howto/sky.html#how-to-convert-sky-map-projections. Just replace the HEALPix map in the example by a WCS CEL map.

#2 Updated by Knödlseder Jürgen over 8 years ago

I recognized that this does maybe not answer your question, as you were asking about coordinates, not maps. Here is how to do this with coordinates:

dir=gammalib.GSkyDir()
dir.radec_deg(83.63,22.01)
l=dir.l_deg()
b=dir.b_deg()
print(l,b)

#3 Updated by Knödlseder Jürgen over 8 years ago

  • % Done changed from 0 to 100

#4 Updated by Mayer Michael over 8 years ago

Maybe we should add a respective section in the documentation?

#5 Updated by Knödlseder Jürgen over 8 years ago

Mayer Michael wrote:

Maybe we should add a respective section in the documentation?

Did this already this morning

#6 Updated by Knödlseder Jürgen over 8 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF