pz-rail-astro-tools 1.0.8__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pz-rail-astro-tools might be problematic. Click here for more details.

Files changed (51) hide show
  1. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/PKG-INFO +1 -1
  2. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/pz_rail_astro_tools.egg-info/PKG-INFO +1 -1
  3. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/astro_tools/_version.py +2 -2
  4. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/grid_selection.py +19 -19
  5. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/observing_condition_degrader.py +34 -37
  6. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/spectroscopic_degraders.py +3 -18
  7. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/spectroscopic_selections.py +0 -22
  8. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/engines/gcr_engine.py +5 -10
  9. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.copier-answers.yml +0 -0
  10. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/ISSUE_TEMPLATE/0-general_issue.md +0 -0
  11. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/ISSUE_TEMPLATE/1-bug_report.md +0 -0
  12. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/ISSUE_TEMPLATE/2-feature_request.md +0 -0
  13. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/pull_request_template.md +0 -0
  14. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/workflows/add-issue-to-project-tracker.yml +0 -0
  15. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/workflows/linting.yml +0 -0
  16. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/workflows/publish-to-pypi.yml +0 -0
  17. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/workflows/smoke-test.yml +0 -0
  18. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.github/workflows/testing-and-coverage.yml +0 -0
  19. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.gitignore +0 -0
  20. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/.pre-commit-config.yaml +0 -0
  21. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/LICENSE +0 -0
  22. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/README.md +0 -0
  23. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/environment.yml +0 -0
  24. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/pyproject.toml +0 -0
  25. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/setup.cfg +0 -0
  26. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/setup.py +0 -0
  27. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/pz_rail_astro_tools.egg-info/SOURCES.txt +0 -0
  28. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/pz_rail_astro_tools.egg-info/dependency_links.txt +0 -0
  29. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/pz_rail_astro_tools.egg-info/requires.txt +0 -0
  30. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/pz_rail_astro_tools.egg-info/top_level.txt +0 -0
  31. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/astro_tools/__init__.py +0 -0
  32. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/photometric_errors.py +0 -0
  33. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/creation/degraders/unrec_bl_model.py +0 -0
  34. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/HSC_grid_settings.pkl +0 -0
  35. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5 +0 -0
  36. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-dr6-galcounts-i20-i25.3-nside-128.fits +0 -0
  37. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-mask-neg-nside-128.fits +0 -0
  38. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_airmass_i_and_nightlt1825_HEAL.fits +0 -0
  39. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_fiveSigmaDepth_i_and_nightlt1825_HEAL.fits +0 -0
  40. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/examples_data/testdata/rubin_dm_dc2_example2.pq +0 -0
  41. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/pipelines/degradation/apply_phot_errors.py +0 -0
  42. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/pipelines/degradation/blending.py +0 -0
  43. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py +0 -0
  44. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/pipelines/degradation/truth_to_observed.py +0 -0
  45. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/src/rail/tools/photometry_tools.py +0 -0
  46. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/gcr_test_data/schema.yaml +0 -0
  47. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/gcr_test_data/test_object_tract_4850.hdf5 +0 -0
  48. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/test_core.py +0 -0
  49. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/test_degraders.py +0 -0
  50. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/test_gcr_engine.py +0 -0
  51. {pz_rail_astro_tools-1.0.8 → pz_rail_astro_tools-1.1.1}/tests/astro_tools/test_pipline.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pz-rail-astro-tools
3
- Version: 1.0.8
3
+ Version: 1.1.1
4
4
  Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
5
5
  License: MIT License
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pz-rail-astro-tools
3
- Version: 1.0.8
3
+ Version: 1.1.1
4
4
  Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
5
5
  License: MIT License
6
6
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.0.8'
16
- __version_tuple__ = version_tuple = (1, 0, 8)
15
+ __version__ = version = '1.1.1'
16
+ __version_tuple__ = version_tuple = (1, 1, 1)
@@ -16,24 +16,24 @@ class GridSelection(Selector):
16
16
  into training and application samples. Option to implement a color-based redshift cut off in each pixel.
17
17
  Option of further degrading the training sample by limiting it to galaxies less than a redshift cutoff by specifying redshift_cut.
18
18
 
19
- Parameters
20
- ----------
21
- color_redshift_cut: True or false, implements color-based redshift cut. Default is True.
22
- If True, ratio_file must include second key called 'data' with magnitudes, colors and spec-z from the spectroscopic sample.
23
- percentile_cut: If using color-based redshift cut, percentile in spec-z above which redshifts will be cut from training sample. Default is 99.0
24
- scaling_factor: Enables the user to adjust the ratios by this factor to change the overall number of galaxies kept. For example, if you wish
25
- to generate 100,00 galaxies but only 50,000 are selected by default, then you can adjust factor up by a factor of 2 to return more galaixes.
26
- redshift_cut: redshift above which all galaxies will be removed from training sample. Default is 100
27
- ratio_file: hdf5 file containing an array of spectroscpic vs. photometric galaxies in each pixel. Default is hsc_ratios.hdf5 for an HSC based selection
28
- settings_file: pickled dictionary containing information about colors and magnitudes used in defining the pixels. Dictionary must include the following keys:
29
- 'x_band_1': string, this is the band used for the magnitude in the color magnitude diagram. Default for HSC is 'i'.
30
- 'x_band_2': string, this is the redder band used for the color in the color magnitude diagram.
31
- if x_band_2 string is not set to '' then the grid is assumed to be over color and x axis color is set to x_band_1 - x_band_2, default is ''.
32
- 'y_band_1': string, this is the bluer band used for the color in the color magnitude grid. Default for HSC is 'g'.
33
- 'y_band_2': string, this is the redder band used for the color in the color magnitude diagram.
34
- if y_band_2 is not set to '' then the y-band is assumed to be over color and is set to y_band_1 - y_band 2.
35
- 'x_limits': 2-element list, this is a list of the lower and upper limits of the magnitude. Default for HSC is [13, 16],
36
- 'y_limits': 2-element list, this is a list of the lower and upper limits of the color. Default for HSC is [-2, 6]}
19
+ .. code-block:: text
20
+
21
+ color_redshift_cut: True or false, implements color-based redshift cut. Default is True.
22
+ If True, ratio_file must include second key called 'data' with magnitudes, colors and spec-z from the spectroscopic sample.
23
+ percentile_cut: If using color-based redshift cut, percentile in spec-z above which redshifts will be cut from training sample. Default is 99.0
24
+ scaling_factor: Enables the user to adjust the ratios by this factor to change the overall number of galaxies kept. For example, if you wish
25
+ to generate 100,00 galaxies but only 50,000 are selected by default, then you can adjust factor up by a factor of 2 to return more galaixes.
26
+ redshift_cut: redshift above which all galaxies will be removed from training sample. Default is 100
27
+ ratio_file: hdf5 file containing an array of spectroscpic vs. photometric galaxies in each pixel. Default is hsc_ratios.hdf5 for an HSC based selection
28
+ settings_file: pickled dictionary containing information about colors and magnitudes used in defining the pixels. Dictionary must include the following keys:
29
+ 'x_band_1': string, this is the band used for the magnitude in the color magnitude diagram. Default for HSC is 'i'.
30
+ 'x_band_2': string, this is the redder band used for the color in the color magnitude diagram.
31
+ if x_band_2 string is not set to '' then the grid is assumed to be over color and x axis color is set to x_band_1 - x_band_2, default is ''.
32
+ 'y_band_1': string, this is the bluer band used for the color in the color magnitude grid. Default for HSC is 'g'.
33
+ 'y_band_2': string, this is the redder band used for the color in the color magnitude diagram.
34
+ if y_band_2 is not set to '' then the y-band is assumed to be over color and is set to y_band_1 - y_band 2.
35
+ 'x_limits': 2-element list, this is a list of the lower and upper limits of the magnitude. Default for HSC is [13, 16],
36
+ 'y_limits': 2-element list, this is a list of the lower and upper limits of the color. Default for HSC is [-2, 6]}
37
37
 
38
38
  NOTE: the default 'HSC' grid file, located in rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5, is based on data from the
39
39
  Second HSC Data Release, details of which can be found here:
@@ -222,4 +222,4 @@ class GridSelection(Selector):
222
222
  total_mask = np.zeros(len(data), dtype=bool)
223
223
  total_mask[final_keep_inds] = True
224
224
 
225
- return total_mask
225
+ return total_mask
@@ -19,43 +19,40 @@ class ObsCondition(Noisifier):
19
19
  using input survey condition maps. The error is based on the
20
20
  LSSTErrorModel from the PhotErr python package.
21
21
 
22
- Parameters
23
- ----------
24
- nside: int, optional
25
- nside used for the HEALPIX maps.
26
- mask: str, optional
27
- Path to the mask covering the survey
28
- footprint in HEALPIX format. Notice that
29
- all negative values will be set to zero.
30
- weight: str, optional
31
- Path to the weights HEALPIX format, used
32
- to assign sample galaxies to pixels. Default
33
- is weight="", which uses uniform weighting.
34
- tot_nVis_flag: bool, optional
35
- If any map for nVisYr are provided, this flag
36
- indicates whether the map shows the total number of
37
- visits in nYrObs (tot_nVis_flag=True), or the average
38
- number of visits per year (tot_nVis_flag=False). The
39
- default is set to True.
40
- random_seed: int, optional
41
- A random seed for reproducibility.
42
- map_dict: dict, optional
43
- A dictionary that contains the paths to the
44
- survey condition maps in HEALPIX format. This dictionary
45
- uses the same arguments as LSSTErrorModel (from PhotErr).
46
- The following arguments, if supplied, may contain either
47
- a single number (as in the case of LSSTErrorModel), or a path:
48
- [m5, nVisYr, airmass, gamma, msky, theta, km, tvis, EBV]
49
- For the following keys:
50
- [m5, nVisYr, gamma, msky, theta, km]
51
- numbers/paths for specific bands must be passed.
52
- Example:
53
- {"m5": {"u": path, ...}, "theta": {"u": path, ...},}
54
- Other LSSTErrorModel parameters can also be passed
55
- in this dictionary (e.g. a necessary one may be [nYrObs]
56
- for the survey condition maps).
57
- If any argument is not passed, the default value in
58
- PhotErr's LsstErrorModel is adopted.
22
+ .. code-block:: text
23
+
24
+ mask: str, optional
25
+ Path to the mask covering the survey
26
+ footprint in HEALPIX format. Notice that
27
+ all negative values will be set to zero.
28
+ weight: str, optional
29
+ Path to the weights HEALPIX format, used
30
+ to assign sample galaxies to pixels. Default
31
+ is weight="", which uses uniform weighting.
32
+ tot_nVis_flag: bool, optional
33
+ If any map for nVisYr are provided, this flag
34
+ indicates whether the map shows the total number of
35
+ visits in nYrObs (tot_nVis_flag=True), or the average
36
+ number of visits per year (tot_nVis_flag=False). The
37
+ default is set to True.
38
+ map_dict: dict, optional
39
+ A dictionary that contains the paths to the
40
+ survey condition maps in HEALPIX format. This dictionary
41
+ uses the same arguments as LSSTErrorModel (from PhotErr).
42
+ The following arguments, if supplied, may contain either
43
+ a single number (as in the case of LSSTErrorModel), or a path:
44
+ [m5, nVisYr, airmass, gamma, msky, theta, km, tvis, EBV]
45
+ For the following keys:
46
+ [m5, nVisYr, gamma, msky, theta, km]
47
+ numbers/paths for specific bands must be passed.
48
+ Example:
49
+ {"m5": {"u": path, ...}, "theta": {"u": path, ...},}
50
+ Other LSSTErrorModel parameters can also be passed
51
+ in this dictionary (e.g. a necessary one may be [nYrObs]
52
+ or the survey condition maps).
53
+ If any argument is not passed, the default value in
54
+ PhotErr's LsstErrorModel is adopted.
55
+
59
56
 
60
57
  """
61
58
 
@@ -13,9 +13,9 @@ class LineConfusion(Noisifier):
13
13
 
14
14
  .. code-block:: python
15
15
 
16
- Example: degrader = LineConfusion(true_wavelen=3727,
17
- wrong_wavelen=5007,
18
- frac_wrong=0.05)
16
+ degrader = LineConfusion(true_wavelen=3727,
17
+ wrong_wavelen=5007,
18
+ frac_wrong=0.05)
19
19
 
20
20
  is a degrader that misidentifies 5% of OII lines (at 3727 angstroms)
21
21
  as OIII lines (at 5007 angstroms), which results in a larger
@@ -26,17 +26,6 @@ class LineConfusion(Noisifier):
26
26
  in a negative redshift, which can occur for low redshift galaxies when
27
27
  wrong_wavelen < true_wavelen.
28
28
 
29
- Parameters
30
- ----------
31
- true_wavelen : positive float
32
- The wavelength of the true emission line.
33
- Wavelength unit assumed to be the same as wrong_wavelen.
34
- wrong_wavelen : positive float
35
- The wavelength of the wrong emission line, which is being confused
36
- for the correct emission line.
37
- Wavelength unit assumed to be the same as true_wavelen.
38
- frac_wrong : float between zero and one
39
- The fraction of galaxies with confused emission lines.
40
29
  """
41
30
 
42
31
  name = 'LineConfusion'
@@ -108,10 +97,6 @@ class InvRedshiftIncompleteness(Selector):
108
97
  p(z) = min(1, z_p/z),
109
98
  where z_p is the pivot redshift.
110
99
 
111
- Parameters
112
- ----------
113
- pivot_redshift : positive float
114
- The redshift at which the incompleteness begins.
115
100
  """
116
101
 
117
102
  name = 'InvRedshiftIncompleteness'
@@ -12,28 +12,6 @@ from rail.utils.path_utils import RAILDIR
12
12
  class SpecSelection(Selector):
13
13
  """The super class of spectroscopic selections.
14
14
 
15
- Parameters
16
- ----------
17
- N_tot : int
18
- The total number of down-sampled, spec-selected galaxies. If N_tot is
19
- greater than the number of spec-sepected galaxies, then it will be
20
- ignored.
21
- nondetect_val : float
22
- The value to be removed for non detects
23
- downsample : bool
24
- If True, then downsample the pre-selected galaxies to N_tot galaxies.
25
- success_rate_dir : string
26
- The path to the success rate files
27
- percentile_cut: int, default=100
28
- If using color-based redshift cut, percentile in redshifts above which
29
- redshifts will be cut from the sample. Default is 100 (no cut).
30
- colnames: dict
31
- A dictionary that includes necessary columns (magnitudes, colors and
32
- redshift) for selection. For magnitudes, the keys are ugrizy; for
33
- colors, the keys are, for example, gr standing for g-r; for redshift,
34
- the key is 'redshift'.
35
- random_seed : int
36
- Random seed for reproducibility
37
15
  """
38
16
 
39
17
  name = "SpecSelection"
@@ -11,16 +11,11 @@ class GCRCreator(Creator):
11
11
 
12
12
  For info on GCRCatalogs, see https://github.com/LSSTDESC/gcr-catalogs
13
13
 
14
- Parameters
15
- ----------
16
- gcr_root_dir : str, default="/global/cfs/cdirs/lsst/shared"
17
- The path to the GCR Catalogs.
18
- catalog_name : str, default="cosmoDC2_v1.1.4_small"
19
- The name of the GCR catalog to load. See https://github.com/LSSTDESC/gcr-catalogs/blob/master/examples/GCRCatalogs%20Demo.ipynb for how to get available options.
20
- quantities : list, default=[redshift, mag_u_lsst, mag_g_lsst, ..., size_true, size_minor_true]
21
- The quantities to query from the catalog. See https://github.com/LSSTDESC/gcr-catalogs/blob/master/GCRCatalogs/SCHEMA.md for all options.
22
- filters : list, default=["mag_i_lsst < 26.5"]
23
- Filters that are passed to the GCR Query.
14
+ See https://github.com/LSSTDESC/gcr-catalogs/blob/master/examples/GCRCatalogs%20Demo.ipynb
15
+ for how to get available options for catalog_name.
16
+
17
+ See https://github.com/LSSTDESC/gcr-catalogs/blob/master/GCRCatalogs/SCHEMA.md
18
+ for all options for quantities to query.
24
19
  """
25
20
 
26
21
  name = "GCRLoader"