Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
72b4159
Using shapepipe image_sims docker as base
Jun 16, 2026
75b51b1
Using shapepipe image_sims docker as base
Jun 16, 2026
003058c
sp_val on image sims; more hdf5 support, n_tiles in header
Jun 29, 2026
10baa52
feat(image-sims): extract self-contained m/c bias estimator
cailmdaley Jul 3, 2026
f586466
feat(image-sims): snakemake orchestration for the m-bias chain
cailmdaley Jul 3, 2026
58756eb
fix(image-sims): im_init stages raw SKiLLS inputs so im_pipeline runs…
cailmdaley Jul 4, 2026
00ed2c4
fix(image-sims): run the m-bias downstream end-to-end on the ngmix-v2…
cailmdaley Jul 4, 2026
ddb95f0
im sims: m-bias computation
Jul 4, 2026
c67d94e
fix(image-sims): track params template + mask as im_init inputs
cailmdaley Jul 4, 2026
4e38326
fix(image-sims): paired "pool" m-bias estimator (shape-noise cancella…
cailmdaley Jul 4, 2026
7b7d15d
docs(image-sims): note reference-load + non-bijective matching caveats
cailmdaley Jul 4, 2026
e38ace9
implementing additive bias correction flag, set to False for image si…
Jul 7, 2026
d0984f2
feat(image-sims): w_col=None gives unit weights (no-weighting mode, #…
cailmdaley Jul 10, 2026
64ec1d7
feat(calibration): mirror Martin's #226 additive_correction flag into…
cailmdaley Jul 10, 2026
04464e1
config(image-sims): unweighted global response for sim calibration (#…
cailmdaley Jul 10, 2026
76bd21f
Merge image_sims_val (Martin's parallel sim-validation stack) into th…
cailmdaley Jul 10, 2026
d49090a
fix(image-sims): shear_amplitude 0.02 -> 0.025 — the true injected |g…
cailmdaley Jul 10, 2026
4a89da2
image_sims: inject PSF_DICT into the ShapePipe container env
cailmdaley Jul 10, 2026
889446b
feat(image-sims): estimator reads branch map from config, not hardcod…
cailmdaley Jul 10, 2026
c6fe3ca
feat(image-sims): add im_manifest rule at head of the DAG
cailmdaley Jul 10, 2026
7d9bd3d
feat(image-sims): fail-fast configuration for the m-bias chain
cailmdaley Jul 10, 2026
e1cbf27
feat(image-sims): one container, one exec prefix
cailmdaley Jul 10, 2026
1a4f5f5
feat(image-sims): commit the candide SLURM profile — one run command
cailmdaley Jul 10, 2026
6378746
fix(image-sims): extract output format back to .fits — the chain's co…
cailmdaley Jul 10, 2026
83ff9b0
feat(image-sims): self-describing results, honest column semantics, d…
cailmdaley Jul 10, 2026
29271b4
feat(image-sims): declare the sim mask config as an overlay on the da…
cailmdaley Jul 10, 2026
ef38e5a
test(image-sims): fixtures declare pair_match and bootstrap_seed
cailmdaley Jul 10, 2026
376f880
Merge imsims-ab-restructure into imsims-ab (Phase A restructure)
cailmdaley Jul 10, 2026
e2b74fe
fix(image-sims): two exec images until sp_validation is uv-locked
cailmdaley Jul 11, 2026
a31504b
feat(image-sims): reconcile multi-weight-scheme m-bias with Phase A r…
cailmdaley Jul 15, 2026
42d1888
fix(image-sims): drop cfis from im_pipeline inputs — fresh-root DAG b…
cailmdaley Jul 15, 2026
4d0e73d
docs(candide-profile): pin cpus_per_task=12 and record the SLURM ops …
cailmdaley Jul 15, 2026
e37e54a
image_sims: add pipeline_config_dir to swap the ngmix ini per run
cailmdaley Jul 16, 2026
cae24bf
refactor(im_sims): declare containers with snakemake's container dire…
cailmdaley Jul 18, 2026
2a870f3
refactor(im_sims): enable apptainer software-deployment in candide pr…
cailmdaley Jul 18, 2026
df2f912
Merge commit '2a870f35' into imsims-workflow-upstream
cailmdaley Jul 19, 2026
36dd99b
fix(image-sims): honour sims_type for m-bias sim-dir naming
cailmdaley Jul 19, 2026
64a5f39
feat(image_sims): optional exp_num to decouple exposure from tile rea…
cailmdaley Jul 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/sp_validation/image_sims.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,17 @@ def load_catalogs(self, verbose=True):
grids_dir = self.cfg["grids_dir"]
num = self.cfg["num"]
cat_name = self.cfg.get("catalog_name", "shape_catalog_cut_ngmix.fits")
# Sim-directory naming mirrors the workflow's contract: grid sims live in
# ``{branch}_grid_{num}``, all other families (e.g. blended) in
# ``{branch}_{num}``. Defaults to ``grid`` so pre-``sims_type`` configs
# and the synthetic-recovery tests keep the historical layout.
sims_type = self.cfg.get("sims_type", "grid")
suffix = f"_grid_{num}" if sims_type == "grid" else f"_{num}"
# ``sim_names`` (incl. the unsheared reference) comes from the config's
# branch map. The +g/-g pool estimator pairs the sheared sims directly;
# the reference is loaded for completeness and null-test diagnostics.
for name in self.sim_names:
path = f"{grids_dir}/{name}_grid_{num}/{cat_name}"
path = f"{grids_dir}/{name}{suffix}/{cat_name}"
if verbose:
print(f" Loading {path}")
self.cats[name] = _load_cat(path, self.w_cols)
Expand Down
7 changes: 4 additions & 3 deletions workflow/image_sims/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ there under ``if "image_sims" in config``.
configfile: "workflow/image_sims/config.yaml"


# The image-sims rules own their container invocation explicitly, so no
# top-level container is needed here.
container: None
# Each rule declares its own image via ``container:`` (the ShapePipe vs
# sp_validation split); with ``--software-deployment-method apptainer`` in the
# candide profile, Snakemake wraps every job in ``apptainer exec``. No
# top-level container here -- the per-rule directives own the choice.


include: "../rules/image_sims.smk"
Expand Down
14 changes: 14 additions & 0 deletions workflow/image_sims/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ image_sims:
# --- simulation grid --------------------------------------------------
sims_type: grid # 'grid' -> *_grid_{num}; anything else -> *_{num} [operational]
num: 1
# Optional: pull exposures from a *different* realization than tiles. Unset ->
# exposures follow `num` (prior behaviour, bit-for-bit). Only meaningful for
# non-grid sims: tiles stay on `{branch}_{num}`, exposures come from
# `{branch}_{exp_num}`. Reproduces Fabian's blended production split -- the
# blended-family realizations _1.._4 carry stale cross-linked SP_exp (grid-sims
# exposures symlinked in, signal-free); _5 is the clean all-real exposure set.
# exp_num: 5
# Branches this run requests: the unsheared reference plus the four +/-
# sheared branches. Injected shear is NOT set here -- it is parsed from each
# branch's basic_info.txt by im_manifest. [operational]
Expand All @@ -63,6 +70,13 @@ image_sims:
# ShapePipe cfis configs (final_cat.param etc.); default is
# {shapepipe_repo}/example/cfis_image_sims once #766 lands. [operational]
config_dir: /n17data/cdaley/unions/scratch-wf/imsims-run/grids/_cfis_image_sims
# ShapePipe config tree the *pipeline* stage runs against (run_job's -c
# override), the one that owns the ngmix ini and hence METACAL_PSF. Empty ->
# run_job self-computes {shapepipe_repo}/example/cfis_image_sims (the
# historical default, byte-exact). Point it at a per-arm copy carrying a
# different ngmix ini to A/B the metacal PSF without editing the worktree.
# [operational]
pipeline_config_dir: ""
psf_model: psfex # [operational]
n_smp: -1 # [operational]
# Extract/calibrate scripts run from the sp_validation repo checkout (branch
Expand Down
33 changes: 17 additions & 16 deletions workflow/profiles/candide/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,30 @@
# cluster policy (executor, account, partition, node excludes, per-job
# defaults); it carries no science and no workflow logic.
#
# What is deliberately NOT here:
#
# * Container / apptainer settings. The image-sims rules set
# ``container: None`` and own their ``apptainer exec`` call through the
# shared ``EXEC`` prefix (one image for every stage, with PYTHONPATH /
# PSF_DICT / OMP_NUM_THREADS injected there). So no
# ``software-deployment-method: apptainer`` / ``apptainer-args`` -- those
# would wrap a *second*, redundant container around jobs that already run
# inside one.
# Containers: the image-sims rules declare their image with Snakemake's own
# per-rule ``container:`` directive (the ShapePipe vs sp_validation split), and
# ``software-deployment-method: apptainer`` here turns that into an
# ``apptainer exec <image>`` around every job. ``apptainer-args`` carries the
# static bind mounts -- the candide paths every job needs mounted. The per-run
# env injections (PYTHONPATH shadowing the branch build, PSF_DICT, OMP_NUM_THREADS
# =1) are NOT here: they are per-run values derived from the run config's repo and
# PSF paths, so they live in committed workflow code (``os.environ`` in
# workflow/rules/image_sims.smk) and reach the container natively -- the slurm
# executor submits ``sbatch --export=ALL`` and apptainer inherits the host env by
# default. Setting them in the .smk, not by hand in the launching shell, keeps
# the "one run command, no implicit uncommitted state" property.
#
# * OMP_NUM_THREADS. It is pinned to 1 on the ``apptainer exec`` line in
# workflow/rules/image_sims.smk, not here. The slurm executor submits with
# ``--export=ALL``, which propagates the *driver's* ambient environment; a
# profile only sets CLI flags, never the driver's own env, so an
# ``OMP_NUM_THREADS`` set here would silently depend on the operator having
# exported it by hand. Injecting it at the container boundary puts it where
# the compute runs, committed and independent of the launching shell.
# What is deliberately NOT here:
#
# * Per-rule resources (mem_mb, runtime). Those live on each rule in the
# .smk; the ``default-resources`` below are only the floor for rules that
# set none.

executor: slurm
software-deployment-method: apptainer
# Bind the candide filesystems every job's inputs/outputs/repos live on.
# /automnt is required when repos or data resolve through the automounter.
apptainer-args: "--bind /n17data,/n09data,/home,/automnt"

# Cluster policy applied to every job unless a rule overrides it. The excludes
# are the flaky/no-internet candide nodes (n17 mount issues, n09 no internet,
Expand Down
Loading
Loading