diff --git a/docs/notebooks/02-generate_template.ipynb b/docs/notebooks/02-generate_template.ipynb index 826f608..6d062ba 100644 --- a/docs/notebooks/02-generate_template.ipynb +++ b/docs/notebooks/02-generate_template.ipynb @@ -11,7 +11,7 @@ "\n", "__author__: @aymgal\n", "\n", - "__last update__: 11/07/23" + "__last update__: 16/07/23" ] }, { @@ -210,16 +210,20 @@ "name": "stdout", "output_type": "stream", "text": [ - "[,\n", - " ,\n", - " ,\n", - " ,\n", - " ]\n" + "Template file '/Users/aymgal/Science/packages/my_packages/coolest/docs/notebooks/template_dir/coolest_template_pyAPI.json' not found, now trying to read '/Users/aymgal/Science/packages/my_packages/coolest/docs/notebooks/template_dir/coolest_template.json'.\n", + "[,\n", + " ,\n", + " ,\n", + " ,\n", + " ]\n" ] } ], "source": [ - "coolest_2 = serializer.load()\n", + "coolest_2 = serializer.load(\n", + " skip_jsonpickle=True, # using skip_jsonpickle=True will ensure to read the pure JSON template\n", + " check_point_sources=False, # using check_point_sources=True will check self-consistency of point source light profiles (in this example we don't have any)\n", + ")\n", "\n", "pprint(coolest_2.lensing_entities)" ] @@ -319,7 +323,7 @@ "output_type": "stream", "text": [ "All parameters with name 'q' that are not fixed:\n", - "[, , , ]\n", + "[, , , ]\n", "\n" ] } @@ -358,7 +362,7 @@ "# output to JSON\n", "template_path_mock = os.path.join(os.getcwd(), TEMPLATE_DIR, TEMPLATE_NAME+\"_mock\")\n", "serializer_mock = JSONSerializer(template_path_mock, obj=coolest_mock,\n", - " check_external_files=True)\n", + " check_external_files=True)\n", "serializer_mock.dump_simple()" ] }, @@ -387,7 +391,7 @@ "# output to JSON\n", "template_path_doc = os.path.join(os.getcwd(), TEMPLATE_DIR, TEMPLATE_NAME+\"_doc\")\n", "serializer_doc = JSONSerializer(template_path_doc, obj=coolest_doc,\n", - " check_external_files=True)\n", + " check_external_files=True)\n", "serializer_doc.dump_simple()" ] } diff --git a/docs/notebooks/template_dir/coolest_template_doc.json b/docs/notebooks/template_dir/coolest_template_doc.json index 3873de8..07f4c6d 100644 --- a/docs/notebooks/template_dir/coolest_template_doc.json +++ b/docs/notebooks/template_dir/coolest_template_doc.json @@ -531,7 +531,7 @@ "meta": {}, "mode": "DOC", "observation": { - "documentation": "Defines the observation itself, that is the image pixels, \n the exposure time, the noise model and/or properties, the magnitude \n zero-point and sky brightness.\n\n Parameters\n ----------\n pixels : PixelatedRegularGrid, optional\n Regular 2D Grid instance for the observed / mock data pixels, by default None\n noise : Noise, optional\n Instance of a Noise object associated with the modeling \n of the data pixels, by default None\n mag_zero_point : float, optional\n Zero-point magnitude, which corresponds to the 1 electron per second\n hitting the detecor (given in mag), by default None\n mag_sky_brightness : float, optional\n Magnitude due to sky brightness (given in mag per arcsec^2), \n by default None", + "documentation": "Defines the observation itself, that is the image pixels, \n the exposure time, the noise model and/or properties, the magnitude \n zero-point and sky brightness.\n\n Parameters\n ----------\n pixels : PixelatedRegularGrid, optional\n Regular 2D Grid instance for the observed / mock data pixels, by default None\n noise : Noise, optional\n Instance of a Noise object associated with the modeling \n of the data pixels, by default None\n mag_zero_point : float, optional\n Zero-point magnitude, which corresponds to the 1 electron per second\n hitting the detector (given in mag), by default None\n mag_sky_brightness : float, optional\n Magnitude due to sky brightness (given in mag per arcsec^2), \n by default None", "exposure_time": null, "mag_sky_brightness": null, "mag_zero_point": null, diff --git a/docs/notebooks/template_dir/coolest_template_pyAPI.json b/docs/notebooks/template_dir/coolest_template_pyAPI.json index ab805a6..7e60d7d 100644 --- a/docs/notebooks/template_dir/coolest_template_pyAPI.json +++ b/docs/notebooks/template_dir/coolest_template_pyAPI.json @@ -1104,7 +1104,7 @@ "with_target_shot_noise": true, "documentation": "Noise properties are computed directly based on the observed \n or modeled flux, and on the Instrument (e.g., readout noise) and \n Observation (e.g., exposure time, sky brightness, etc.) properties.\n\n Parameters\n ----------\n with_readout_noise : bool, optional\n If True, the noise includes readout noise from the detector, by default True\n with_sky_shot_noise : bool, optional\n If True, the noise includes shot noise from sky background flux \n (as the Gaussian approximation of the Poisson noise), by default True\n with_target_shot_noise : bool, optional\n If True, the noise includes shot noise from the target flux \n (as the Gaussian approximation of the Poisson noise), by default True" }, - "documentation": "Defines the observation itself, that is the image pixels, \n the exposure time, the noise model and/or properties, the magnitude \n zero-point and sky brightness.\n\n Parameters\n ----------\n pixels : PixelatedRegularGrid, optional\n Regular 2D Grid instance for the observed / mock data pixels, by default None\n noise : Noise, optional\n Instance of a Noise object associated with the modeling \n of the data pixels, by default None\n mag_zero_point : float, optional\n Zero-point magnitude, which corresponds to the 1 electron per second\n hitting the detecor (given in mag), by default None\n mag_sky_brightness : float, optional\n Magnitude due to sky brightness (given in mag per arcsec^2), \n by default None" + "documentation": "Defines the observation itself, that is the image pixels, \n the exposure time, the noise model and/or properties, the magnitude \n zero-point and sky brightness.\n\n Parameters\n ----------\n pixels : PixelatedRegularGrid, optional\n Regular 2D Grid instance for the observed / mock data pixels, by default None\n noise : Noise, optional\n Instance of a Noise object associated with the modeling \n of the data pixels, by default None\n mag_zero_point : float, optional\n Zero-point magnitude, which corresponds to the 1 electron per second\n hitting the detector (given in mag), by default None\n mag_sky_brightness : float, optional\n Magnitude due to sky brightness (given in mag per arcsec^2), \n by default None" }, "instrument": { "py/object": "coolest.template.classes.instrument.Instrument", diff --git a/docs/notebooks/template_dir/obs.fits b/docs/notebooks/template_dir/obs.fits index a467ff9..c50405e 100644 Binary files a/docs/notebooks/template_dir/obs.fits and b/docs/notebooks/template_dir/obs.fits differ