From 1578285a1fd99444a001fce5ceef16c6d13d9f2d Mon Sep 17 00:00:00 2001 From: Ismael Mendoza Date: Sun, 14 Nov 2021 15:28:45 -0500 Subject: [PATCH 1/2] should be a public method --- btk/main.py | 4 ++-- btk/survey.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/btk/main.py b/btk/main.py index 337453196..da841442d 100644 --- a/btk/main.py +++ b/btk/main.py @@ -7,12 +7,12 @@ from btk.measure import available_measure_functions from btk.measure import MeasureGenerator from btk.metrics import MetricsGenerator -from btk.survey import _get_survey_from_cfg +from btk.survey import get_survey_from_cfg def main(cfg: OmegaConf): """Run BTK from end-to-end using a hydra configuration object.""" - surveys = [_get_survey_from_cfg(cfg.surveys[survey_name]) for survey_name in cfg.surveys] + surveys = [get_survey_from_cfg(cfg.surveys[survey_name]) for survey_name in cfg.surveys] # get draw blends generator. draw_blend_generator = instantiate(cfg.draw_blends, surveys=surveys) diff --git a/btk/survey.py b/btk/survey.py index 2682ce941..a6e4e07ca 100644 --- a/btk/survey.py +++ b/btk/survey.py @@ -63,7 +63,7 @@ extinction (float): Exponential extinction coefficient for atmospheric absorption""" -def _get_survey_from_cfg(survey_conf: OmegaConf): +def get_survey_from_cfg(survey_conf: OmegaConf): """Creates the corresponding `btk.survey.Survey` object using the information from config file. Args: @@ -129,7 +129,7 @@ def get_surveys(names="Rubin", overrides: Iterable = ()): cfg = compose("config", overrides=overrides) for survey_name in cfg.surveys: survey_conf = cfg.surveys[survey_name] - surveys.append(_get_survey_from_cfg(survey_conf)) + surveys.append(get_survey_from_cfg(survey_conf)) if len(surveys) == 1: return surveys[0] return surveys From 7967beaadfc6be9fff694644ac96dc81ee850d70 Mon Sep 17 00:00:00 2001 From: Ismael Mendoza Date: Sun, 14 Nov 2021 15:36:29 -0500 Subject: [PATCH 2/2] remove mention of more examples that are non existant --- notebooks/02b-custom-tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/02b-custom-tutorial.ipynb b/notebooks/02b-custom-tutorial.ipynb index 0b06fe8cf..3d72c6c38 100644 --- a/notebooks/02b-custom-tutorial.ipynb +++ b/notebooks/02b-custom-tutorial.ipynb @@ -337,7 +337,7 @@ "- psf: PSF for the filter. This can be provided in two ways:\n", " - Providing a Galsim PSF model, e.g. `galsim.Kolmogorov(fwhm)` or any convolution of such models.\n", " - Providing a function which returns a Galsim model when called (with no arguments). This can be used when you \n", - " you want to randomize the PSF. More on that in the example below.\n", + " you want to randomize the PSF.\n", " In the case of the default surveys, we only use the first possibility, computing the model using the get_psf function beforehand; those models have an atmospheric and an optical component.\n", "\n", "Surveys are usually imported using `btk.survey.get_surveys(survey_names)`, which will create the Survey object(s) from a config file (currently, the implemented surveys are Rubin, HSC, HST, Euclid, DES and CFHT); it is also possible to create them directly in Python.\n",