Skip to content

science_image error: ValueError: found bias but time delta is greater than required

With a list of images pruned, I have an error in "science image" processing

/sps/ztf/users/colley/ppho/run04/field_600_100exp.pruned.txt

slurn log from here /sps/ztf/users/colley/ppho/run04/.snakemake/slurm_logs/group_g0_aperture_catalog_nopecorr_science_images/50408129.log

loading 96 samples from /sps/ztf/users/colley/ppho/run02/field_600_100exp.pruned.txt
  selected fields 600 (96 samples left)
  selected 5 samples out of 96
dataset loaded with 5 samples
host: ccwslurm0097
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 4
Rules claiming more threads will be scaled down.
Provided resources: disk_mib=3816, mem_mib=15628, disk_mb=4000, cpu_per_tasks=4, mem_mb=16384
Select jobs to execute...
Execute 4 jobs...

[Mon Mar 24 23:24:14 2025]
localrule science_images:
    input: /sps/ztf/data/raw/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o.fits.fz (retrieve from storage)
    output: results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q1/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q2/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q3/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q4/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q1/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q2/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q3/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q4/sciimg.header.fits (send to storage)
    jobid: 4
    reason: Forced execution
    wildcards: path=results/2018/0101/172894, date=20180101172894, field=000600, filtercode=zg, ccdid=04
    resources: mem_mb=4096, mem_mib=3907, disk_mb=1000, disk_mib=954, tmpdir=/tmp, slurm_partition=htc, slurm_account=ztf, slurm_extra=--licenses=sps, cpu_per_tasks=1, runtime=5

Exception returns by ztfin2p3 package

Traceback (most recent call last):
  File "/sps/ztf/users/colley/ppho/run04/.snakemake/scripts/tmph7s_ccl5.science_images.py", line 47, in <module>
    build_science_images(
  File "/sps/ztf/users/colley/ppho/run04/.snakemake/scripts/tmph7s_ccl5.science_images.py", line 32, in build_science_images
    biasfile = find_closest_calib_file(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sps/ztf/data/storage/scenemodeling/env_cache/conda/a5f9a56c1563cd9af52ffbb07d58c29e_/lib/python3.12/site-packages/ztfin2p3/science.py", line 572, in find_closest_calib_file
    ztfin2p3.science.build_science_image(
  File "/sps/ztf/data/storage/scenemodeling/env_cache/conda/a5f9a56c1563cd9af52ffbb07d58c29e_/lib/python3.12/site-packages/ztfin2p3/science.py", line 185, in build_science_image
    biasfile = find_closest_calib_file(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/sps/ztf/data/storage/scenemodeling/env_cache/conda/a5f9a56c1563cd9af52ffbb07d58c29e_/lib/python3.12/site-packages/ztfin2p3/science.py", line 572, in find_closest_calib_file
    raise ValueError(f"found {kind} but time delta is greater than required ({td})")
ValueError: found bias but time delta is greater than required (61 days 00:00:00)

Error returns by snakemake

Error in rule science_images:
    jobid: 4
    input: /sps/ztf/data/raw/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o.fits.fz (retrieve from storage)
    output: results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q1/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q2/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q3/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q4/sciimg.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q1/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q2/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q3/sciimg.header.fits (send to storage), results/2018/0101/172894/ztf_20180101172894_000600_zg_c04_o_q4/sciimg.header.fits (send to storage)
    conda-env: /sps/ztf/data/storage/scenemodeling/env_cache/conda/a5f9a56c1563cd9af52ffbb07d58c29e_

so the error appears for image ztf_20180101172894_000600_zg_c04_o.fits.fz and more see slurm log.

It's a know issue ?