DavidT3 / DAXA

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
12 stars 0 forks source link

Add a DAXA wrapper for the reprocessing script #315

Closed DavidT3 closed 5 days ago

DavidT3 commented 1 week ago

I have decided to go the same route I've taken with SAS, and Jess took with eSASS, wrapping the CIAO tools with a Popen call - that way all the machinery can basically stay the same, and I get the same logging etc.

Also means we can support installations of CIAO that haven't been installed into the current environment.

Nothing against their Python implementation though.

CIAO provides some ideas of how to implement it like we will (https://cxc.cfa.harvard.edu/ciao/scripting/runtool.html) but I've done this enough times that there isn't really anything new there.

They do explicitly say to watch out for colliding processes accessing pfiles - good to be told, we should be able to handle that.

DavidT3 commented 1 week ago

We'll make a new PFILES directory and alter the environment variable. I was looking at their context manager for this 'new_pfiles_environment' - which is undoubtedly a nicer way to this, but I won't copy them for now.

They also copy over the 'ardlib.par' parameter file - I'm not gonna do this right now, but perhaps will if something is clearly awry

DavidT3 commented 5 days ago

I am currently retrieving and storing the following files from the chandra_repro run:

There are other files I suspect I should keep, the asol and eph files for instance, but haven't yet done anything with them.

DavidT3 commented 5 days ago

The chandra_repro function now works properly within DAXA infrastructure!!

DavidT3 commented 5 days ago

I suspect there is still some fine-tuning that needs to be done (over and above the missing features mentioned in issue #333 ) - from what I've seen on the CIAO documentation site, HRC processing can produce some different files, and I haven't specifically tested it out yet.

DavidT3 commented 5 days ago

Will now test the DAXA implementation of chandra_repro on a larger set of observations - finding relevant observations for the ACCEPT 1 sample springs to mind.

DavidT3 commented 5 days ago

Distilling the notes I had in the chandra_repro docstring before I actually wrote it properly:

NOTES:

DavidT3 commented 5 days ago

Incidentally, downloading and processing data relevant to the ACCEPT 1 sample went fine - approximately 1800 observations were identified and ran through the chandra_repro step with no issues.