ambra-dipiano / astroRT

CTA simulator based on ctools with additional native functionalities
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

mapper-plot-fix #3

Open ambra-dipiano opened 11 months ago

ambra-dipiano commented 11 months ago

The base_mapper plot function is bugged and sometimes will break the pipe. Needs to investigate and fix, but low priority since I will no longer use it to generate input dataset for DL models.

ambra-dipiano commented 11 months ago

The error happens with background maps plotting only

Traceback (most recent call last): File "base_mapper.py", line 65, in <module> main(args.configuration, args.nodes) File "base_mapper.py", line 55, in main base_mapper(configuration) File "base_mapper.py", line 42, in base_mapper plotmap = plot_map(fitsmap, log) File "/data01/homes/dipiano/astroRT/astrort/utils/wrap.py", line 169, in plot_map plot.plot_fits_skymap(fitsmap, plotmap) File "/data01/homes/dipiano/astroRT/astrort/utils/plotting.py", line 187, in plot_fits_skymap data, wcs = self.get_skymap_data_with_wcs(file=file) File "/data01/homes/dipiano/astroRT/astrort/utils/plotting.py", line 216, in get_skymap_data_with_wcs w = WCS(h['SKYMAP'].header) File "/data01/homes/dipiano/.conda/envs/astrort/lib/python3.8/site-packages/astropy/wcs/wcs.py", line 549, in __init__ self.wcs.set() astropy.wcs._wcs.InvalidTransformError: ERROR 7 in wcsset() at line 2659 of file cextern/wcslib/C/wcs.c: Ill-conditioned coordinate transformation parameter. ERROR 4 in celset() at line 441 of file cextern/wcslib/C/cel.c: Ill-conditioned coordinate transformation parameters No valid solution for latp for these values of phip, phi0, and theta0.