Skip to content

Commit

Permalink
Changed examples calling deprecated functions and values
Browse files Browse the repository at this point in the history
  • Loading branch information
rapoliveira committed Mar 8, 2024
1 parent 50663d2 commit ff8e9d7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/example_08_planet_grid_fitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"point_lens_event.plot_data(show_bad=True)\n",
"pl.show()\n",
"print(point_lens_event.get_ref_fluxes())\n",
"print(point_lens_event.model.magnification(t_0))\n",
"print(point_lens_event.model.get_magnification(t_0))\n",
"\n",
"point_lens_event.plot_model(subtract_2460000=True, color='black', zorder=10)\n",
"point_lens_event.plot_data(show_bad=True, subtract_2460000=True)\n",
Expand Down Expand Up @@ -629,7 +629,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/example_13_caustic_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def generate_random_parameters(parameters, starting, n, s=None, q=None):
if 'methods' in model_settings:
my_model.set_magnification_methods(model_settings['methods'])
if 'default_method' in model_settings:
my_model.set_default_magnification_method(model_settings['default_method'])
my_model.default_magnification_method = model_settings['default_method']
my_event = mm.Event(datasets=datasets, model=my_model)

# Prepare sampler.
Expand Down
2 changes: 1 addition & 1 deletion examples/example_15_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def generate_random_parameters(parameters, starting, n):
if 'methods' in model_settings:
my_model.set_magnification_methods(model_settings['methods'])
if 'default_method' in model_settings:
my_model.set_default_magnification_method(model_settings['default_method'])
my_model.default_magnification_method = model_settings['default_method']
my_event = mm.Event(datasets=datasets, model=my_model)

# Prepare sampler.
Expand Down
4 changes: 2 additions & 2 deletions examples/example_16/ulens_model_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,8 @@ def _make_model_and_event(self):
for (band, u_value) in self._model_parameters[key].items():
model.set_limb_coeff_u(band, u_value)
if 'default method' in self._model_parameters:
model.set_default_magnification_method(
self._model_parameters['default method'])
model.default_magnification_method = \
self._model_parameters['default method']
if 'methods' in self._model_parameters:
model.set_magnification_methods(
self._model_parameters['methods'])
Expand Down

0 comments on commit ff8e9d7

Please sign in to comment.