Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoLSS analysis threw up an odd problem where the spectral read in gets the name of the spectrum for a coordinate #1121

Open
DavidT3 opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@DavidT3
Copy link
Owner

DavidT3 commented Feb 23, 2024

ValueError Traceback (most recent call last)
/tmp/ipykernel_84841/3087412192.py in
2 lolss_rads = Quantity(lolss_pnt_only_samp['Maj'].values / 2, 'arcsec')
3
----> 4 lolss_srcs = PointSample(lolss_pnt_only_samp['RA'].values, lolss_pnt_only_samp['DEC'].values,
5 name=lolss_pnt_only_samp['Source_name'].values, point_radius=lolss_rads)
6 lolss_srcs.info()

/mnt/pact/dt237/code/PycharmProjects/XGA/xga/samples/general.py in init(self, ra, dec, redshift, name, point_radius, use_peak, peak_lo_en, peak_hi_en, back_inn_rad_factor, back_out_rad_factor, cosmology, load_fits, clean_obs, clean_obs_threshold, no_prog_bar, psf_corr, telescope, search_distance)
386 # thrown I have to catch it and not add that source to this sample.
387 try:
--> 388 self._sources[n] = PointSource(r, d, z, n, pr, use_peak, peak_lo_en, peak_hi_en,
389 back_inn_rad_factor, back_out_rad_factor, cosmology, True, load_fits,
390 regen_merged=False, in_sample=True, telescope=telescope,

/mnt/pact/dt237/code/PycharmProjects/XGA/xga/sources/general.py in init(self, ra, dec, redshift, name, point_radius, use_peak, peak_lo_en, peak_hi_en, back_inn_rad_factor, back_out_rad_factor, cosmology, load_products, load_fits, clean_obs, clean_obs_threshold, regen_merged, in_sample, telescope, search_distance)
488 """
489
--> 490 super().init(ra, dec, redshift, name, cosmology, load_products, load_fits, in_sample, telescope,
491 search_distance, back_inn_rad_factor=back_inn_rad_factor,
492 back_out_rad_factor=back_out_rad_factor)

/mnt/pact/dt237/code/PycharmProjects/XGA/xga/sources/base.py in init(self, ra, dec, redshift, name, cosmology, load_products, load_fits, in_sample, telescope, search_distance, sel_null_obs, null_load_products, back_inn_rad_factor, back_out_rad_factor, load_regions, load_spectra)
505 # This goes at the end of init to make sure everything necessary has been declared
506 if os.path.exists(OUTPUT) and load_products:
--> 507 self._existing_xga_products(load_fits, load_spectra)
508
509 # Now going to save load_fits in an attribute, just because if the observation is cleaned we need to

/mnt/pact/dt237/code/PycharmProjects/XGA/xga/sources/base.py in _existing_xga_products(self, read_fits, load_spectra)
1242 # I now store the central coordinate in the file name, and read it out into astropy quantity
1243 # for when I need to define the spectrum object
-> 1244 central_coord = Quantity([float(sp_info[3].strip('ra')), float(sp_info[4].strip('dec'))], 'deg')
1245 # Also read out the inner and outer radii into astropy quantities (I know that
1246 # they will be in degree units).

ValueError: could not convert string to float: 'LOL1J115633.8x552049'

Not seen this before - I'm wondering if it could have happened because a spectrum was originally generated with the old (pre-multi-mission) version of XGA? THough I don't think I changed the naming conventions so I don't see why.

@DavidT3 DavidT3 added the bug Something isn't working label Feb 23, 2024
@DavidT3 DavidT3 self-assigned this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant