Skip to content

Commit

Permalink
Merge pull request #19 from LSSTDESC/ceci2
Browse files Browse the repository at this point in the history
Update for ceci version 2
  • Loading branch information
jlvdb authored Jul 17, 2024
2 parents b65dbb3 + 96efc92 commit 4c93188
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 104 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ dynamic = ["version"]
dependencies = [
"numpy",
"h5py",
"ceci<2.0", # there is a compatibility issue between RAIL and ceci v2.0
"pz-rail-base",
"pz-rail-base>=1.0.3",
"qp-prob",
# fix yet_another_wizz version; if there is a new release, issue a new
# patch or minor version release, depending on the changes requred
Expand Down
12 changes: 6 additions & 6 deletions src/rail/estimation/algos/cc_yaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ class YawAutoCorrelate(
("output", YawCorrFuncHandle),
]

def __init__(self, args, comm=None):
super().__init__(args, comm)
def __init__(self, args, **kwargs):
super().__init__(args, **kwargs)
warn_thread_num_deprecation(self.get_algo_config_dict())

def correlate(self, sample: YawCacheHandle | YawCache) -> YawCorrFuncHandle:
Expand Down Expand Up @@ -294,8 +294,8 @@ class YawCrossCorrelate(
("output", YawCorrFuncHandle),
]

def __init__(self, args, comm=None):
super().__init__(args, comm)
def __init__(self, args, **kwargs):
super().__init__(args, **kwargs)
warn_thread_num_deprecation(self.get_algo_config_dict())

def correlate(
Expand Down Expand Up @@ -387,8 +387,8 @@ class YawSummarize(
("output", ModelHandle),
]

def __init__(self, args, comm=None):
super().__init__(args, comm=comm)
def __init__(self, args, **kwargs):
super().__init__(args, **kwargs)
config = {p: self.config_options[p].value for p in stage_config.yaw_resampling}
self.yaw_config = ResamplingConfig.create(**config)

Expand Down
63 changes: 42 additions & 21 deletions src/rail/pipelines/estimation/yaw_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,57 @@
output_dir: data
log_dir: logs
resume: false
config: yaw_pipeline_config.yml
modules: rail
inputs:
auto_corr_unk: none
data_ref: data/input_data.parquet
data_unk: data/input_data.parquet
patch_source_ref: none
rand_ref: data/input_rand.parquet
data_unk: data/input_data.parquet
rand_unk: none
log_dir: logs
modules: rail
output_dir: data
resume: false
site:
max_threads: 2
name: local
patch_source_ref: none
auto_corr_unk: none
stages:
- classname: YawCacheCreate
module_name: rail.estimation.algos.cc_yaw
name: cache_ref
- name: cache_ref
classname: YawCacheCreate
nprocess: 1
- classname: YawCacheCreate
module_name: rail.estimation.algos.cc_yaw
name: cache_unk
aliases:
data: data_ref
rand: rand_ref
patch_source: patch_source_ref
output: output_cache_ref
- name: cache_unk
classname: YawCacheCreate
nprocess: 1
- classname: YawAutoCorrelate
module_name: rail.estimation.algos.cc_yaw
name: auto_corr
aliases:
data: data_unk
rand: rand_unk
patch_source: output_cache_ref
output: output_cache_unk
- name: auto_corr
classname: YawAutoCorrelate
nprocess: 1
- classname: YawCrossCorrelate
module_name: rail.estimation.algos.cc_yaw
name: cross_corr
aliases:
output: output_auto_corr
sample: output_cache_ref
- name: cross_corr
classname: YawCrossCorrelate
nprocess: 1
- classname: YawSummarize
module_name: rail.estimation.algos.cc_yaw
name: summarize
aliases:
output: output_cross_corr
reference: output_cache_ref
unknown: output_cache_unk
- name: summarize
classname: YawSummarize
nprocess: 1
module_name: rail.estimation.algos.cc_yaw
aliases:
output: output_summarize
cross_corr: output_cross_corr
auto_corr_ref: output_auto_corr
site:
max_threads: 2
name: local
117 changes: 42 additions & 75 deletions src/rail/pipelines/estimation/yaw_pipeline_config.yml
Original file line number Diff line number Diff line change
@@ -1,100 +1,67 @@
auto_corr:
aliases:
output: output_auto_corr
sample: output_cache_ref
config: null
method: linear
name: auto_corr
output_mode: default
rbin_num: 50
rmax: 1000.0
rmin: 100.0
rweight: null
sample: None
thread_num: null
verbose: debug
zbin_num: 8
zbins: null
zmax: 3.0
zmin: 0.0
cache_ref:
aliases:
data: data_ref
output: output_cache_ref
patch_source: patch_source_ref
rand: rand_ref
config: null
data: None
dec_name: dec
n_patches: 5
name: cache_ref
output_mode: default
overwrite: true
patch_file: null
patch_name: null
patch_source: None
path: data/test_ref
overwrite: true
ra_name: ra
rand: None
dec_name: dec
redshift_name: z
verbose: debug
weight_name: null
cache_unk:
aliases:
data: data_unk
output: output_cache_unk
patch_source: output_cache_ref
rand: rand_unk
config: null
data: None
dec_name: dec
n_patches: null
name: cache_unk
output_mode: default
overwrite: true
patch_file: null
patch_name: null
patch_source: None
n_patches: 5
verbose: debug
name: cache_ref
config: null
cache_unk:
output_mode: default
path: data/test_unk
overwrite: true
ra_name: ra
rand: None
dec_name: dec
redshift_name: null
verbose: debug
weight_name: null
cross_corr:
aliases:
output: output_cross_corr
reference: output_cache_ref
unknown: output_cache_unk
patch_file: null
patch_name: null
n_patches: null
verbose: debug
name: cache_unk
config: null
method: linear
name: cross_corr
auto_corr:
output_mode: default
rbin_num: 50
reference: None
rmax: 1000.0
rmin: 100.0
rmax: 1000.0
rweight: null
rbin_num: 50
zmin: 0.0
zmax: 3.0
zbin_num: 8
method: linear
zbins: null
thread_num: null
unknown: None
verbose: debug
name: auto_corr
config: null
cross_corr:
output_mode: default
rmin: 100.0
rmax: 1000.0
rweight: null
rbin_num: 50
zmin: 0.0
zmax: 3.0
zbin_num: 8
method: linear
zbins: null
zmax: 3.0
zmin: 0.0
summarize:
aliases:
auto_corr_ref: output_auto_corr
cross_corr: output_cross_corr
output: output_summarize
auto_corr_ref: None
auto_corr_unk: None
thread_num: null
verbose: debug
name: cross_corr
config: null
cross_corr: None
cross_est: null
crosspatch: true
name: summarize
summarize:
output_mode: default
cross_est: null
ref_est: null
unk_est: null
crosspatch: true
verbose: debug
name: summarize
config: null

0 comments on commit 4c93188

Please sign in to comment.