guaix-ucm / megaradrp

MEGARA (Multi-Espectrógrafo en GTC de Alta Resolución para Astronomía) is a facility instrument designed for the 10.4m GTC telescope in La Palma (Spain).
https://guaix.fis.ucm.es/megara/
GNU General Public License v3.0
12 stars 6 forks source link

Missmatch between overplot_traces and ds9 load regions #305

Closed Vital-Fernandez closed 2 years ago

Vital-Fernandez commented 2 years ago

Hi, I wonder if anyone could share their input on this issue using the overplot_traces script to plot the master_traces.json.

When I use ds9 to plot the traces from the ds9_raw.reg file I get the expected results:

ds9_image

However, plotting the master_traces.json from the same task I get this:

megara_drp_image

It seems there is an offset in the upper region (and also towards the left in the spectral direction)

I am using this command:

from megaradrp.tools.overplot_traces import main as megaradrp_traces_plot

function_argument_list = [fits_address.as_posix(), master_traces_file.as_posix(), '--fibids']
megaradrp_traces_plot(function_argument_list)

I wonder if I am missing some arguments to properly place the traces.

Thank you very much for any advice.

nicocardiel commented 2 years ago

It seems that this image corresponds to a raw frame. In this case you should use the argument '--rawimage'. Otherwise the code assumes that the image has already been trimmed.

Vital-Fernandez commented 2 years ago

Thank you very much that worked perfectly!!