Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 4 additions & 30 deletions py/picca/bin/picca_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,30 +134,6 @@ def main(cmdargs=None):
),
)

parser.add_argument(
"--z-cut-min",
type=float,
default=0.0,
required=False,
help=(
"Use only pairs of forest x object with the mean "
"of the last absorber redshift and the object "
"redshift larger than z-cut-min"
),
)

parser.add_argument(
"--z-cut-max",
type=float,
default=10.0,
required=False,
help=(
"Use only pairs of forest x object with the mean "
"of the last absorber redshift and the object "
"redshift smaller than z-cut-max"
),
)

parser.add_argument(
"--z-min-sources",
type=float,
Expand Down Expand Up @@ -350,8 +326,6 @@ def main(cmdargs=None):
cf.r_par_max = args.rp_max
cf.r_trans_max = args.rt_max
cf.r_par_min = args.rp_min
cf.z_cut_max = args.z_cut_max
cf.z_cut_min = args.z_cut_min
cf.z_min_pairs = args.z_min_pairs
cf.z_max_pairs = args.z_max_pairs
cf.num_bins_r_par = args.np
Expand Down Expand Up @@ -506,12 +480,12 @@ def main(cmdargs=None):
'value': cf.num_bins_r_trans,
'comment': 'Number of bins in r-transverse'
}, {
'name': 'ZCUTMIN',
'value': cf.z_cut_min,
'name': 'ZMIN',
'value': cf.z_min_pairs,
'comment': 'Minimum redshift of pairs'
}, {
'name': 'ZCUTMAX',
'value': cf.z_cut_max,
'name': 'ZMAX',
'value': cf.z_max_pairs,
'comment': 'Maximum redshift of pairs'
}, {
'name': 'NSIDE',
Expand Down
28 changes: 0 additions & 28 deletions py/picca/bin/picca_cf_angl.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,6 @@ def main(cmdargs):
required=False,
help='Number of angular bins')

parser.add_argument(
'--z-cut-min',
type=float,
default=0.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift larger than '
'z-cut-min'))

parser.add_argument(
'--z-cut-max',
type=float,
default=10.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift smaller than '
'z-cut-max'))

parser.add_argument(
'--z-min-sources',
type=float,
Expand Down Expand Up @@ -197,8 +179,6 @@ def main(cmdargs):
cf.r_par_min = args.wr_min
cf.r_par_max = args.wr_max
cf.r_trans_max = args.ang_max
cf.z_cut_max = args.z_cut_max
cf.z_cut_min = args.z_cut_min
cf.num_bins_r_par = args.np
cf.num_bins_r_trans = args.nt
cf.nside = args.nside
Expand Down Expand Up @@ -305,14 +285,6 @@ def main(cmdargs):
'name': 'NT',
'value': cf.num_bins_r_trans,
'comment': 'Number of bins in angle'
}, {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In picca_cf.py, picca_dmat.py, picca_export.py, etc. this was replaced by ZMIN and ZMAX adding the minimum and maximum redshift of pairs. Shouldn't we do the same here for consistency?

'name': 'ZCUTMIN',
'value': cf.z_cut_min,
'comment': 'Minimum redshift of pairs'
}, {
'name': 'ZCUTMAX',
'value': cf.z_cut_max,
'comment': 'Maximum redshift of pairs'
}, {
'name': 'NSIDE',
'value': cf.nside,
Expand Down
8 changes: 6 additions & 2 deletions py/picca/bin/picca_coadd_zint.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,12 @@ def coadd_dmats(input_files,output_file):
return

def main(cmdargs):
"""Coadds correlation function from different redshift intervals"""
parser = argparse.ArgumentParser()
"""This script is deprecated and will be removed in future versions.
Coadds correlation function from different redshift intervals"""
parser = argparse.ArgumentParser(
description=("This script is deprecated and will be removed in future versions."
" Coadds correlation function from different redshift intervals")
)

parser.add_argument("--data",
type=str,
Expand Down
6 changes: 5 additions & 1 deletion py/picca/bin/picca_compute_pk_pksb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
from picca.constants import SPEED_LIGHT

def main(cmdargs):
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=("This script is deprecated and will be removed in future versions."
" Use the make_template.py script in Vega instead.")
)

parser.add_argument('-i','--ini', type=str, required=True,
help='Input config file for CAMB')
Expand Down
34 changes: 4 additions & 30 deletions py/picca/bin/picca_dmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,30 +138,6 @@ def main(cmdargs=None):
),
)

parser.add_argument(
"--z-cut-min",
type=float,
default=0.0,
required=False,
help=(
"Use only pairs of forest x object with the mean of the last "
"absorber redshift and the object redshift larger than "
"z-cut-min"
),
)

parser.add_argument(
"--z-cut-max",
type=float,
default=10.0,
required=False,
help=(
"Use only pairs of forest x object with the mean of the last "
"absorber redshift and the object redshift smaller than "
"z-cut-max"
),
)

parser.add_argument(
"--z-min-sources",
type=float,
Expand Down Expand Up @@ -357,8 +333,6 @@ def main(cmdargs=None):
cf.r_par_max = args.rp_max
cf.r_par_min = args.rp_min
cf.r_trans_max = args.rt_max
cf.z_cut_max = args.z_cut_max
cf.z_cut_min = args.z_cut_min
cf.z_min_pairs = args.z_min_pairs
cf.z_max_pairs = args.z_max_pairs
cf.num_bins_r_par = args.np
Expand Down Expand Up @@ -549,13 +523,13 @@ def main(cmdargs=None):
"comment": "Coefficient for model binning",
},
{
"name": "ZCUTMIN",
"value": cf.z_cut_min,
"name": "ZMIN",
"value": cf.z_min_pairs,
"comment": "Minimum redshift of pairs",
},
{
"name": "ZCUTMAX",
"value": cf.z_cut_max,
"name": "ZMAX",
"value": cf.z_max_pairs,
"comment": "Maximum redshift of pairs",
},
{"name": "REJ", "value": cf.reject, "comment": "Rejection factor"},
Expand Down
8 changes: 8 additions & 0 deletions py/picca/bin/picca_export.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines will cause the export code to fail for previously generated correlations. While this may not be common, it could still lead to issues.

For backward compatibility, I suggest guarding this block so it only executes when ZMIN and ZMAX are present in the headers.

Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@ def main(cmdargs=None):
'name': 'NT',
'value': num_bins_r_trans,
'comment': 'Number of bins in r-transverse'
}, {
'name': 'ZMIN',
'value': head['ZMIN'],
'comment': 'Minimum redshift of pairs'
}, {
'name': 'ZMAX',
'value': head['ZMAX'],
'comment': 'Maximum redshift of pairs'
}, {
'name': 'OMEGAM',
'value': head['OMEGAM'],
Expand Down
32 changes: 3 additions & 29 deletions py/picca/bin/picca_fast_metal_dmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def main(cmdargs=None):
absorption."""
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description='Computes metal matrices')
description=('This script is deprecated and will be removed in future versions. '
'Use Vega functionality instead.')
)

parser.add_argument('--out',
type=str,
Expand Down Expand Up @@ -292,24 +294,6 @@ def main(cmdargs=None):
help=('Coefficient multiplying np and nt to get finner binning for the '
'model'))

parser.add_argument(
'--z-cut-min',
type=float,
default=0.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift larger than '
'z-cut-min'))

parser.add_argument(
'--z-cut-max',
type=float,
default=10.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift smaller than '
'z-cut-max'))

parser.add_argument('--z-min-sources',
type=float,
default=0.,
Expand Down Expand Up @@ -439,8 +423,6 @@ def main(cmdargs=None):
cf.r_par_max = args.rp_max
cf.r_trans_max = args.rt_max
cf.r_par_min = args.rp_min
cf.z_cut_max = args.z_cut_max
cf.z_cut_min = args.z_cut_min
cf.num_bins_r_par = args.np * args.coef_binning_model
cf.num_bins_r_trans = args.nt * args.coef_binning_model
cf.num_model_bins_r_par = args.np * args.coef_binning_model
Expand Down Expand Up @@ -572,14 +554,6 @@ def main(cmdargs=None):
'name': 'COEFMOD',
'value': args.coef_binning_model,
'comment': 'Coefficient for model binning'
}, {
'name': 'ZCUTMIN',
'value': cf.z_cut_min,
'comment': 'Minimum redshift of pairs'
}, {
'name': 'ZCUTMAX',
'value': cf.z_cut_max,
'comment': 'Maximum redshift of pairs'
}, {
'name': 'REJ',
'value': cf.reject,
Expand Down
33 changes: 3 additions & 30 deletions py/picca/bin/picca_fast_metal_xdmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ def main(cmdargs=None):
a list of IGM absorption."""
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description=('Computes metal matrices for the cross-correlation '
'delta x object for a list of IGM absorption.'))
description=('This script is deprecated and will be removed in future versions. '
'Use Vega functionality instead.')
)

parser.add_argument('--out',
type=str,
Expand Down Expand Up @@ -287,24 +288,6 @@ def main(cmdargs=None):
required=False,
help='Max redshift for object field')

parser.add_argument(
'--z-cut-min',
type=float,
default=0.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift larger than '
'z-cut-min'))

parser.add_argument(
'--z-cut-max',
type=float,
default=10.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift smaller than '
'z-cut-max'))

parser.add_argument('--z-min-sources',
type=float,
default=0.,
Expand Down Expand Up @@ -414,8 +397,6 @@ def main(cmdargs=None):
xcf.r_par_max = args.rp_max
xcf.r_par_min = args.rp_min
xcf.r_trans_max = args.rt_max
xcf.z_cut_max = args.z_cut_max
xcf.z_cut_min = args.z_cut_min
xcf.num_bins_r_par = args.np * args.coef_binning_model
xcf.num_bins_r_trans = args.nt * args.coef_binning_model
xcf.num_model_bins_r_par = args.np * args.coef_binning_model
Expand Down Expand Up @@ -532,14 +513,6 @@ def main(cmdargs=None):
'name': 'COEFMOD',
'value': args.coef_binning_model,
'comment': 'Coefficient for model binning'
}, {
'name': 'ZCUTMIN',
'value': xcf.z_cut_min,
'comment': 'Minimum redshift of pairs'
}, {
'name': 'ZCUTMAX',
'value': xcf.z_cut_max,
'comment': 'Maximum redshift of pairs'
}, {
'name': 'OMEGAM',
'value': args.fid_Om,
Expand Down
30 changes: 0 additions & 30 deletions py/picca/bin/picca_metal_dmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,6 @@ def main(cmdargs=None):
help=('Coefficient multiplying np and nt to get finner binning for the '
'model'))

parser.add_argument(
'--z-cut-min',
type=float,
default=0.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift larger than '
'z-cut-min'))

parser.add_argument(
'--z-cut-max',
type=float,
default=10.,
required=False,
help=('Use only pairs of forest x object with the mean of the last '
'absorber redshift and the object redshift smaller than '
'z-cut-max'))

parser.add_argument(
'--z-min-sources',
type=float,
Expand Down Expand Up @@ -297,8 +279,6 @@ def main(cmdargs=None):
cf.r_par_max = args.rp_max
cf.r_trans_max = args.rt_max
cf.r_par_min = args.rp_min
cf.z_cut_max = args.z_cut_max
cf.z_cut_min = args.z_cut_min
cf.num_bins_r_par = args.np * args.coef_binning_model
cf.num_bins_r_trans = args.nt * args.coef_binning_model
cf.num_model_bins_r_par = args.np * args.coef_binning_model
Expand Down Expand Up @@ -509,16 +489,6 @@ def main(cmdargs=None):
'value': args.coef_binning_model,
'comment': 'Coefficient for model binning'
},
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In picca_cf.py, picca_dmat.py, picca_export.py, etc. this was replaced by ZMIN and ZMAX adding the minimum and maximum redshift of pairs. Shouldn't we do the same here for consistency?

'name': 'ZCUTMIN',
'value': cf.z_cut_min,
'comment': 'Minimum redshift of pairs'
},
{
'name': 'ZCUTMAX',
'value': cf.z_cut_max,
'comment': 'Maximum redshift of pairs'
},
{
'name': 'REJ',
'value': cf.reject,
Expand Down
Loading
Loading