You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The image-sims ShapePipe run is a separate orchestrator (example/cfis_image_sims plus the *_canfar_v2.0.bash dispatcher, driven from sp_validation's image_sims.smk), and the config cleanup that came with the data workflow (#847, #852) has broken it: its default.* symlinks dangle and it selects mask configs that no longer exist. Meanwhile the Snakemake workflow (#852) does everything the sims need — chunked ngmix, node-local vignette staging, completeness checks, resume, the run report — and the sims get none of it.
Target: sims are a branch of the one workflow, not a sibling.
rules/image_sims.smk in the main tree. Two config keys select the branch: kind: data|sims (where the pixels come from and how they're named) and psf_model: psfex|mccd|fake. They stay separate so sims can also run the real PSF chain once the star-injected grids exist.
The sims delta is small: a few _sims ini variants under workflow/config/cfis/, one new rule (tile_fake_psf), and tile_uncompress/exp_psf skipped for sims. Everything else is the data DAG unchanged.
Gone: example/cfis_image_sims, the bash dispatcher (after a deprecation release — they're packaged entry points), and sp_validation's im_init/im_pipeline/im_merge with their ShapePipe-internal config keys.
Steps — each becomes a sub-issue when we're ready to pick it up:
sp run --config-file and a candide profile (shapepipe). No dependencies; this is the two-machine work.
The sims branch (shapepipe): kind/psf_model keys, _sims ini variants, tile_fake_psf, the two elided rules. Acceptance: one tile of grid_3 through sp run, compared against the existing catalogue.
config_tile_Git_{kind}.ini (INPUT_PATH, INPUT_FILE_PATTERN, INPUT_NUMBERING\d{3}\.\d{3} vs \d{3}-\d{3}, INPUT_FILE_EXT, OUTPUT_FILE_PATTERN). Plus a rule-side change:get_images_runner matches tile_numbers.txt, which unit_pre writes in dot format; sims need the dashed id, so unit_pre branches on kind (or exports a third var). Not ini-only.
tile_uncompress
✓
—
Elided for sims (weights ship uncompressed); sims' Sx reads the weight from Git directly. Works because A's inis use fixed absolute INPUT_DIRs. Kills bit 2.
tile_find_exposures
✓
✓
config_tile_Fe_{kind}.ini — not one ini. Verified diff: FILE_PATTERNCFIS_image→CFIS_simu_image, COLNUM 3→2, EXP_PREFIXp→simu_image-. Those two are FITS-HISTORY parsing facts, they define the tile↔exposure edge build_index.py consumes, and getting them wrong yields a wrong or empty exposure list silently.
exp_get_images
✓
✓
config_exp_Gie_{kind}.ini (patterns + roots).
exp_split
✓
✓
One ini; FILE_EXT → $SP_IMG_EXT. N_HDU = 40 identical.
exp_psf
✓
only if psf_model != fake
Unchanged for data (post-#888). A sims × psfex variant is a fourth ini — see §2.1.
tile_fake_psf (new)
—
only if psf_model == fake
Tile-level, between tile_detect and tile_vignets. Must join the tile_shape group — fake_psf_runner writes galaxy_psf*.sqlite, the store ngmix reads at random per object per epoch, which is exactly what node-local NVMe staging exists for; outside the group it lands on NFS. Joining means inheriting the group's resource contract, and NGMIX_VIGNET_DIR hardcodes run_sp_tile_PiViVi, so any sims PiViVi variant keeps that RUN_NAME.
tile_exp_forest, tile_merge_headers
✓
✓
Unchanged (config_tile_Mh_exp_{kind}.ini for WARN_MISSING_EXP/INPUT_DIR).
config_tile_PiViVi_{psf_model}.ini gains a fake variant (vignetmakers only).
tile_ngmix
✓
✓
Both keys: PSF-source dir on psf_model, background inputs + BKG_SUB on kind. Chunking, ngmix_ranges.json, the tile_shape group apply unchanged — sims gain parallel ngmix, their compute bottleneck, for free.
tile_merge_cats, tile_make_cat
✓
✓
config_tile_Mc.ini carries no psf suffix on the data side; sims' config_tile_Mc_psfex.ini folds into it.
The image-sims ShapePipe run is a separate orchestrator (
example/cfis_image_simsplus the*_canfar_v2.0.bashdispatcher, driven from sp_validation'simage_sims.smk), and the config cleanup that came with the data workflow (#847, #852) has broken it: itsdefault.*symlinks dangle and it selects mask configs that no longer exist. Meanwhile the Snakemake workflow (#852) does everything the sims need — chunked ngmix, node-local vignette staging, completeness checks, resume, the run report — and the sims get none of it.Target: sims are a branch of the one workflow, not a sibling.
rules/image_sims.smkin the main tree. Two config keys select the branch:kind: data|sims(where the pixels come from and how they're named) andpsf_model: psfex|mccd|fake. They stay separate so sims can also run the real PSF chain once the star-injected grids exist._simsini variants underworkflow/config/cfis/, one new rule (tile_fake_psf), andtile_uncompress/exp_psfskipped for sims. Everything else is the data DAG unchanged.1z2z,1p2z, …) is one campaign: fivesp runs over the same sky with different input roots. sp_validation's sims workflow drives ShapePipe — its m-bias DAG callssp runper branch, then reads only the campaign products (Persist PSF products and add the two campaign-level merges (exp_persist, star_cat_merge, final_cat_merge) #879'sfinal_cat_<campaign>.hdf5plus a run manifest), never ShapePipe's run tree.example/cfis_image_sims, the bash dispatcher (after a deprecation release — they're packaged entry points), and sp_validation'sim_init/im_pipeline/im_mergewith their ShapePipe-internal config keys.Steps — each becomes a sub-issue when we're ready to pick it up:
sp run --config-fileand a candide profile (shapepipe). No dependencies; this is the two-machine work.final_cat_merge.kind/psf_modelkeys,_simsini variants,tile_fake_psf, the two elided rules. Acceptance: one tile ofgrid_3throughsp run, compared against the existing catalogue.im_shapepipecallingsp runper branch,cat_configreading the manifest;im_init/im_pipeline/im_mergeand their keys removed. The comprehensive catalogue comes from the v2 hdf5 readers (Read ShapePipe v2 campaign products: hdf5 catalogues, MASK_n* cut, patches retired sp_validation#343) rather thanextract_info.py(Config cleanup: one source of truth + fiducial-plus-overrides philosophy sp_validation#294).example/cfis_image_simsand the bash dispatcher (shapepipe), one release later removal.Supersedes the pipeline half of CosmoStat/sp_validation#284 / #285 / #287; related: #870, #885.
Rule table (data vs sims)
tile_get_imagesconfig_tile_Git_{kind}.ini(INPUT_PATH,INPUT_FILE_PATTERN,INPUT_NUMBERING\d{3}\.\d{3}vs\d{3}-\d{3},INPUT_FILE_EXT,OUTPUT_FILE_PATTERN). Plus a rule-side change:get_images_runnermatchestile_numbers.txt, whichunit_prewrites in dot format; sims need the dashed id, sounit_prebranches onkind(or exports a third var). Not ini-only.tile_uncompressSxreads the weight fromGitdirectly. Works because A's inis use fixed absoluteINPUT_DIRs. Kills bit 2.tile_find_exposuresconfig_tile_Fe_{kind}.ini— not one ini. Verified diff:FILE_PATTERNCFIS_image→CFIS_simu_image,COLNUM3→2,EXP_PREFIXp→simu_image-. Those two are FITS-HISTORY parsing facts, they define the tile↔exposure edgebuild_index.pyconsumes, and getting them wrong yields a wrong or empty exposure list silently.exp_get_imagesconfig_exp_Gie_{kind}.ini(patterns + roots).exp_splitFILE_EXT→$SP_IMG_EXT.N_HDU = 40identical.exp_psfpsf_model != fakesims × psfexvariant is a fourth ini — see §2.1.tile_fake_psf(new)psf_model == faketile_detectandtile_vignets. Must join thetile_shapegroup —fake_psf_runnerwritesgalaxy_psf*.sqlite, the store ngmix reads at random per object per epoch, which is exactly what node-local NVMe staging exists for; outside the group it lands on NFS. Joining means inheriting the group's resource contract, andNGMIX_VIGNET_DIRhardcodesrun_sp_tile_PiViVi, so any sims PiViVi variant keeps thatRUN_NAME.tile_exp_forest,tile_merge_headersconfig_tile_Mh_exp_{kind}.iniforWARN_MISSING_EXP/INPUT_DIR).tile_detectconfig_tile_Sx_{kind}.ini(weight source, image pattern).tile_vignetsconfig_tile_PiViVi_{psf_model}.inigains afakevariant (vignetmakers only).tile_ngmixpsf_model, background inputs +BKG_SUBonkind. Chunking,ngmix_ranges.json, thetile_shapegroup apply unchanged — sims gain parallel ngmix, their compute bottleneck, for free.tile_merge_cats,tile_make_catconfig_tile_Mc.inicarries no psf suffix on the data side; sims'config_tile_Mc_psfex.inifolds into it.clean_exposure,clean_tilefinal_cat_merge(#879)— Fable on behalf of Cail