keflavich / cube-line-extractor

4 stars 1 forks source link

Modified sample_pixel to read ds9 regions file #20

Closed jmangum closed 5 years ago

jmangum commented 5 years ago

Since sample_position required knowing what the pixel position of the desired sample position was in the cutout cube, which one would not necessarily have before running CubeLineMoment, thought it useful to be able to read an (RA,Dec) position for sample_pixel from a ds9 file. CubeLineMoment now also extracts the label meta variable and uses it in the titles for the diagnostic plots.

Note, though, that I really do not like the way I solved this problem, as I had to read-in the cutoutcube in order to access its WCS information so that I could turn the (RA,Dec) from the ds9 file into a pixel coordinate. This extra FITS file read noticeably slows the script down. I am sure that @keflavich has a slicker way to get at the WCS information.