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

Check 'obs_archive' input type in the 'ful_proces....' functions #284

Open
DavidT3 opened this issue Jun 20, 2024 · 0 comments
Open

Check 'obs_archive' input type in the 'ful_proces....' functions #284

DavidT3 opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels
refinement If a feature has already been implemented, and works, but could do with another pass to improve it.

Comments

@DavidT3
Copy link
Owner

DavidT3 commented Jun 20, 2024

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.

@DavidT3 DavidT3 added the refinement If a feature has already been implemented, and works, but could do with another pass to improve it. label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refinement If a feature has already been implemented, and works, but could do with another pass to improve it.
Projects
None yet
Development

No branches or pull requests

2 participants