StingraySoftware / HENDRICS

Shell scripts for spectral-timing analysis of X-ray astronomical data.
http://hendrics.readthedocs.io
Other
22 stars 13 forks source link

HENreadevents renames certain files incorrectly #119

Closed mckinley-brumback closed 3 years ago

mckinley-brumback commented 3 years ago

Describe the bug When running HENreadevents with certain, specific file names that contain the letter "l" (lower case L), the procedure renames the files incorrectly. Normally when running HENreadevents, the file name is extended to contain information about the telescope and instrument being used. For example, from working with my SMC X-1 NuSTAR data:

HENreadevents nu50311001002B01_cl_srcB_withex_en3_30kev_bary_scorr.evt produces a file called "nu50311001002B01_cl_srcB_withex_en3_30kev_bary_scorr_nustar_fpmb_ev.nc. This is the expected behavior.

However, when working with my LMC X-1 NuSTAR data, I have named the file slightly differently. This time:

HENreadevents nu50311001002B01_cl_srcB_withex_en3_30kev_bary_lcorr.evt produces a file called "nu50311001002B01_cl_srcB_withex_en3_30kev_baryorr_nustar_fpmb_ev.nc"

The error appears to be specific to the name of the file and not the file itself. That is, if I rename my SMC X-1 data to contain the phrase "lcorr", the same error happens. And if I rename my LMC X-4 data to contain the phrase "scorr", the error does not happen.

Desktop (please complete the following information):

matteobachetti commented 3 years ago

@mckinley-brumback thanks for reporting, I know where this comes from and I'll try to get it fixed asap

matteobachetti commented 3 years ago

@mckinley-brumback Sorry it's taking long, but any non-patchy solution requires some planning. In the meantime, please avoid any strings that look like _ev, _lc, _pds, _calib in your file names, because the function that renames files interprets them as HENDRICS' own renaming.