Democratising Archival X-ray Astronomy (DAXA) is an easy-to-use Python module for downloading multi-mission X-ray telescope data and processing it into usable archives. Users can acquire entire archives, or filter observations based on ID/positions/time. Supports XMM; partial support eROSITA, Chandra, NuSTAR, Swift, Suzaku, ASCA, ROSAT, INTEGRAL
BSD 3-Clause "New" or "Revised" License
15
stars
0
forks
source link
Check 'obs_archive' input type in the 'ful_proces....' functions #284
I accidentally passed a mission rather than an archive and it just gives a type error:
TypeError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 full_process_erosita(er)
File /mnt/pact/dt237/code/PycharmProjects/DAXA/daxa/process/simple.py:124, in full_process_erosita(obs_archive, lo_en, hi_en, num_cores, timeout)
106 """
107 This is a convenience function that will fully process and prepare eROSITA data in an archive using the default
108 configuration settings of all the cleaning steps. If you wish to exercise finer grained control over the
(...)
120 processes of each stage.
121 """
123 # This tool attempts to automatically remove any time periods that are heavily affected by soft-proton flaring
--> 124 flaregti(obs_archive, num_cores=num_cores, timeout=timeout)
125 # Creates final cleaned event lists for eROSITA missions
126 eros_cleaned_evt_lists(obs_archive, lo_en, hi_en, num_cores=num_cores, timeout=timeout)
File /mnt/pact/dt237/code/PycharmProjects/DAXA/daxa/process/erosita/_common.py:225, in esass_call..wrapper(*args, **kwargs)
222 obs_archive: Archive # Just for autocomplete purposes in my IDE
224 # Seeing if any of the erosita missions in the archive have had any processing done yet
--> 225 erosita_miss = [mission for mission in obs_archive if mission.name in ALLOWED_EROSITA_MISSIONS]
226 for miss in erosita_miss:
227 # Getting the process_logs for each mission
228 process_logs = obs_archive._process_logs[miss.name]
TypeError: 'eRASS1DE' object is not iterable
rather than anything more useful - and let's face it it is an easy enough mistake to make.
I accidentally passed a mission rather than an archive and it just gives a type error:
TypeError Traceback (most recent call last) Input In [6], in <cell line: 1>() ----> 1 full_process_erosita(er)
File /mnt/pact/dt237/code/PycharmProjects/DAXA/daxa/process/simple.py:124, in full_process_erosita(obs_archive, lo_en, hi_en, num_cores, timeout) 106 """ 107 This is a convenience function that will fully process and prepare eROSITA data in an archive using the default 108 configuration settings of all the cleaning steps. If you wish to exercise finer grained control over the (...) 120 processes of each stage. 121 """ 123 # This tool attempts to automatically remove any time periods that are heavily affected by soft-proton flaring --> 124 flaregti(obs_archive, num_cores=num_cores, timeout=timeout) 125 # Creates final cleaned event lists for eROSITA missions 126 eros_cleaned_evt_lists(obs_archive, lo_en, hi_en, num_cores=num_cores, timeout=timeout)
File /mnt/pact/dt237/code/PycharmProjects/DAXA/daxa/process/erosita/_common.py:225, in esass_call..wrapper(*args, **kwargs)
222 obs_archive: Archive # Just for autocomplete purposes in my IDE
224 # Seeing if any of the erosita missions in the archive have had any processing done yet
--> 225 erosita_miss = [mission for mission in obs_archive if mission.name in ALLOWED_EROSITA_MISSIONS]
226 for miss in erosita_miss:
227 # Getting the process_logs for each mission
228 process_logs = obs_archive._process_logs[miss.name]
TypeError: 'eRASS1DE' object is not iterable
rather than anything more useful - and let's face it it is an easy enough mistake to make.