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

Visualization.py fails when trying to plot contours #296

Closed gildepaz closed 3 years ago

gildepaz commented 3 years ago

While "python -m megaradrp.visualization final_rss.fits" works fine when adding --contour it fails and gives the following error:

world coordinates in pixel compute average in [1000, 3000] /Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/site-packages/megaradrp/visualization.py:80: MatplotlibDeprecationWarning: The 'offset_position' parameter of init() was deprecated in Matplotlib 3.3 and will be removed two minor releases later. If any parameter follows 'offset_position', they should be passed as keyword, not positionally. offset_position="data" /Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/site-packages/megaradrp/visualization.py:80: MatplotlibDeprecationWarning: The set_offset_position function was deprecated in Matplotlib 3.3 and will be removed two minor releases later. offset_position="data" Traceback (most recent call last): File "/Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/site-packages/megaradrp/visualization.py", line 453, in main() File "/Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/site-packages/megaradrp/visualization.py", line 413, in main s_cube = create_cube_from_rss(synt, order, target_scale_arcsec, conserve_flux=conserve_flux) File "/Users/agpaz/anaconda3/envs/megaradev/lib/python3.7/site-packages/megaradrp/processing/cube.py", line 317, in create_cube_from_rss region = rss_data[rows, :]