Skip to content

Whole pipeline crashes if one image can't be solved #66

@jenivevepearson

Description

@jenivevepearson

I'm reducing MMIRS images and one of the K band images doesn't seem to be solving to the GAIA catalog and instead of skipping the image the pipeline just exits. I have visually inspected all the raw images and it looks like it should be easily solvable since there are several bright stars so I'm not sure why it's failing in the first place.
Here is the log of the reduction right before it fails:

[solve_wcs.py::193] [INFO] Try #1 with astrometry.net...
[solve_wcs.py::200] [INFO] solve-field /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.fits --scale-units arcsecperpix --scale-low 0.1616 --scale-high 0.2424 --ra 159.692042 --dec 53.5096 --radius 0.5 --no-plots -T --overwrite -N /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.solved.fits --dir /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace --use-source-extractor --source-extractor-path /DATA1/jpearson/anaconda3/envs/potpyri/bin/sex --downsample 2 --no-verify --odds-to-tune-up 1e4 --objs 15
[solve_wcs.py::225] [INFO] /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.solved.fits exists: True
[solve_wcs.py::233] [INFO] SUCCESS: solved /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.fits
[solve_wcs.py::317] [INFO] Got 103 Gaia DR3 alignment stars
[solve_wcs.py::345] [INFO] Found 15 stars in the image
[photometry.py::80] [INFO] Running source extractor on /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.fits
[photometry.py::92] [INFO] Reading /DATA1/jpearson/AZTEC/MMT/SN2021gmj_K/2025.0115/red/workspace/SN2021gmj_K.K.ut250115.32.11.1421400079.cat
[solve_wcs.py::356] [INFO] Converging on fine WCS solution
Traceback (most recent call last):################################################# |
File "/DATA1/jpearson/.local/bin/main_pipeline", line 8, in
sys.exit(main())
File "/DATA1/jpearson/Imaging_pipelines_jj/POTPyRI/potpyri/scripts/main_pipeline.py", line 167, in main
main_pipeline(**vars(args))
File "/DATA1/jpearson/Imaging_pipelines_jj/POTPyRI/potpyri/scripts/main_pipeline.py", line 129, in main_pipeline
stack = image_procs.image_proc(target_table, tel, paths,
File "/DATA1/jpearson/Imaging_pipelines_jj/POTPyRI/potpyri/stages/image_procs.py", line 283, in image_proc
aligned_images, aligned_data = align_images(reduced_files, paths, tel, binn,
File "/DATA1/jpearson/Imaging_pipelines_jj/POTPyRI/potpyri/stages/image_procs.py", line 115, in align_images
success = solve_wcs.align_to_gaia(file, tel, log=log)
File "/DATA1/jpearson/Imaging_pipelines_jj/POTPyRI/potpyri/stages/solve_wcs.py", line 402, in align_to_gaia
w = fit_wcs_from_points(xy, coords, proj_point=central_coo, sip_degree=sip_degree)
File "/usr/local/lib/python3.10/dist-packages/astropy/wcs/utils.py", line 1108, in fit_wcs_from_points
xpmin, xpmax, ypmin, ypmax = xp.min(), xp.max(), yp.min(), yp.max()
File "/usr/local/lib/python3.10/dist-packages/numpy/core/_methods.py", line 45, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions