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

chandra_repro fails if both compressed and uncompressed bpix files are present #904

Open
hamogu opened this issue Sep 13, 2024 · 3 comments

Comments

@hamogu
Copy link
Contributor

hamogu commented Sep 13, 2024

When I run chandra_repro in a directory that has both compressed and uncompressed versions of the bpix file, it fails. The output indicates that it recognizes that both, the compressed and the uncompressed file, are present and that it would choose one of them (the output literally says "will try to use uncompressed file"), but then it fails a few lines later with an error message about multiple bpix files.

This is the layout of the input directory, which comes from downloading obsid 1103, running chandra_repro, and then emptying out the repro directory (note that primary now has both .fits and .fits.gz files for several of the primary products):

(ciao-4.16) (base) dhcp-10-31-180-120 ~/projects/Chandraprojects/makermf/data/test_chandra_repro/1103> ls *
00README                     axaff01103N002_VV001_vv2.pdf oif.fits

primary:
acisf01103N005_cntr_img2.jpg     acisf01103N005_full_img2.jpg     acisf01103_000N003_bpix1.fits    acisf01103_000N003_fov1.fits     orbitf054000064N002_eph1.fits.gz
acisf01103N005_evt2.fits.gz      acisf01103N005_pha2.fits.gz      acisf01103_000N003_bpix1.fits.gz acisf01103_000N003_fov1.fits.gz  pcadf054541515N003_asol1.fits

repro:

secondary:
acisf01103_000N003_aoff1.fits.gz   acisf01103_000N003_mtl1.fits.gz    acisf054541630N003_0_bias0.fits.gz acisf054541630N003_4_bias0.fits.gz axaff01103N002_VV001_vvref2.pdf.gz
acisf01103_000N003_evt1.fits       acisf01103_000N003_soff1.fits.gz   acisf054541630N003_1_bias0.fits.gz acisf054541630N003_5_bias0.fits.gz ephem
acisf01103_000N003_flt1.fits.gz    acisf01103_000N003_stat1.fits.gz   acisf054541630N003_2_bias0.fits.gz acisf054542948N003_pbk0.fits.gz
acisf01103_000N003_msk1.fits.gz    acisf01103_000N004_evt1a.fits.gz   acisf054541630N003_3_bias0.fits.gz aspect

Here is the error:

(ciao-4.16) (base) dhcp-10-31-180-120 ~/projects/Chandraprojects/makermf/data/test_chandra_repro/1103_copied> chandra_repro
Input directory (.): 
Output directory (default = $indir/repro) (): 

Running chandra_repro
version: 22 January 2023


Processing input directory '/Users/guenther/projects/Chandraprojects/makermf/data/test_chandra_repro/1103_copied'


WARNING: A compressed version of file '/Users/guenther/projects/Chandraprojects/makermf/data/test_chandra_repro/1103_copied/primary/acisf01103_000N003_fov1.fits' also exists.  Will try to use uncompressed file.


WARNING: A compressed version of file '/Users/guenther/projects/Chandraprojects/makermf/data/test_chandra_repro/1103_copied/primary/acisf01103_000N003_bpix1.fits' also exists.  Will try to use uncompressed file.


Cleaning up intermediate files

Multiple input bpix1 files found, please select one and restart. If this is a multi-obi OBS_ID, try running the splitobs script first.
# chandra_repro (22 January 2023): ERROR input error

If I delete either the compressed or uncompressed bpix file before calling chandra_repro it successfully runs to completion.

@hamogu hamogu changed the title chandra_repro fails is compressed and uncompressed bpix files are present chandra_repro fails if both compressed and uncompressed bpix files are present Sep 13, 2024
@hamogu
Copy link
Contributor Author

hamogu commented Sep 13, 2024

I'm not actually sure now if I created the input directory by just running chandra_repro or if I unpacked the bpix file manually. Either way, the issue is still valid: If the script says "Will try to use uncompressed file." then it should not fail right after with "Multiple input bpix1 files found, please select one and restart."

@kglotfelty
Copy link
Member

Usually on the mac's when you manually uncompress the files you end up with "dot" files that chandra_repro finds and that may be what it's reporting.

Can you do an 'ls -alF' in the primary dir?

@hamogu
Copy link
Contributor Author

hamogu commented Sep 13, 2024

If I uncompressed it, I would have done that within Python or on the command line and not through the Mac explorer (the change in directory name compared to the previous post is because I made a copy of the entire dir to debug, while I continue to work on what I'm working on in the other directory):

~/projects/Chandraprojects/makermf/data/test_chandra_repro/1103/primary> ls -alF
-rw-r--r--   1 guenther  staff    576644 Sep 13 09:45 acisf01103N005_cntr_img2.jpg
-rw-r--r--   1 guenther  staff  24088815 Sep 13 09:45 acisf01103N005_evt2.fits.gz
-rw-r--r--   1 guenther  staff     74765 Sep 13 09:45 acisf01103N005_full_img2.jpg
-rw-r--r--   1 guenther  staff   1122132 Sep 13 09:45 acisf01103N005_pha2.fits.gz
-rw-r--r--   1 guenther  staff    164160 Sep 13 09:45 acisf01103_000N003_bpix1.fits
-rw-r--r--   1 guenther  staff     13666 Sep 13 09:45 acisf01103_000N003_bpix1.fits.gz
-rw-r--r--   1 guenther  staff     25920 Sep 13 09:45 acisf01103_000N003_fov1.fits
-rw-r--r--   1 guenther  staff      5902 Sep 13 09:45 acisf01103_000N003_fov1.fits.gz
-rw-r--r--   1 guenther  staff    308516 Sep 13 09:45 orbitf054000064N002_eph1.fits.gz
-rw-r--r--   1 guenther  staff  20612160 Sep 13 09:45 pcadf054541515N003_asol1.fits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants