Skip to content

Commit

Permalink
removed deprecated np.int
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMalavolta committed Apr 30, 2024
1 parent 3b0af30 commit 64e1598
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 37 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ Fro **Technical problems and software maintenance** please contact Luca Malavolt


**News**
In version 1.1 it is much easier to add new instruments
Version 1.3 now satisfies the new FITS requirements of `molecfit` version 4.3.1 (as for 30th of April 2024)
Starting from version 1.1, it is much easier to add new instruments

Paper accepted, repository now publicly available, documentation and examples coming online in a few days.

Basic [documentation available here](https://sloppy.readthedocs.io/en/latest/), updates will follow in the upcoming weeks.
Basic [documentation is available here](https://sloppy.readthedocs.io/en/latest/).

Most of the information can be found in Sicilia et al. (2022) [A&A link](https://doi.org/10.1051/0004-6361/202244055) [ADS link](https://ui.adsabs.harvard.edu/abs/2022arXiv220813045S/abstract) [arXiv link](https://arxiv.org/abs/2208.13045)

**Note on the use of `molecfitv**

**Note on the use of molecfit**

`SLOPpy` supports both the old version `1.5.x` (available as a stand-alone program) and the latest version `>4` through ESO esorex.
`SLOPpy` supports both the old version `1.5.x` (available as a stand-alone program) and the latest version `>4` through ESO `esorex`.

To use version 1.5.x, you have to use the molecfit modules marked with `v1`, and specify the installation path under the `molecfit` section:
To use version 1.5.x, you have to use the `molecfit` modules marked with `v1`, and specify the installation path under the `molecfit` section:

```bash
pipeline:
Expand Down
2 changes: 1 addition & 1 deletion SLOPpy/quick_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def compute_quick_transmission(config_in, lines_label):
'subroutine': subroutine_name,
'binned_wave': shared_data['binned']['wave'][binned_selection],
'binned_step': shared_data['binned']['step'][binned_selection],
'binned_size': np.int(np.sum(binned_selection))
'binned_size': int(np.sum(binned_selection))
}

import matplotlib.pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion SLOPpy/spectra_lightcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def compute_spectra_lightcurve(config_in, lines_label):
'range': lines_dict['range'],
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
}

if 'full_transit_duration' in planet_dict:
Expand Down
2 changes: 1 addition & 1 deletion SLOPpy/spectra_lightcurve_bkp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def compute_spectra_lightcurve(config_in, lines_label):
'range': lines_dict['range'],
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
}


Expand Down
32 changes: 16 additions & 16 deletions SLOPpy/subroutines/mcmc_fit_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def logprob_case00(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -147,7 +147,7 @@ def logprob_case01(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -228,7 +228,7 @@ def logprob_case02(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -295,7 +295,7 @@ def logprob_case03(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -363,7 +363,7 @@ def logprob_case10(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -455,7 +455,7 @@ def logprob_case11(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -546,7 +546,7 @@ def logprob_case12(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)

jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
Expand Down Expand Up @@ -639,7 +639,7 @@ def logprob_case13(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -729,7 +729,7 @@ def logprob_case14(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -820,7 +820,7 @@ def logprob_case15(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -913,7 +913,7 @@ def logprob_case20(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -999,7 +999,7 @@ def logprob_case21(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -1084,7 +1084,7 @@ def logprob_case22(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -1169,7 +1169,7 @@ def logprob_case23(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ def logprob_case24(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def logprob_case25(theta,
jitter_pams = 0.
elif len(jitter_index) > 0:
jitter_array = jitter_index * 0.
n_jitter = np.int(np.amax(jitter_index) + 1)
n_jitter = int(np.amax(jitter_index) + 1)
jitter_pams = np.empty(n_jitter)
for i_j in range(0, n_jitter):
sel = (jitter_index == i_j)
Expand Down
4 changes: 2 additions & 2 deletions SLOPpy/transmission_lightcurve_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def compute_transmission_lightcurve_average(config_in, lines_label, reference='p
'range': lines_dict['range'],
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
'binned_wave': shared_data['binned']['wave'][binned_selection],
'binned_step': shared_data['binned']['step'][binned_selection],
'binned_size': np.int(np.sum(binned_selection))
'binned_size': int(np.sum(binned_selection))
}

for output_selection in output_list:
Expand Down
4 changes: 2 additions & 2 deletions SLOPpy/transmission_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def compute_transmission_spectrum(config_in, lines_label, reference='planetRF',
'range': lines_dict['range'],
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
'binned_wave': shared_data['binned']['wave'][binned_selection],
'binned_step': shared_data['binned']['step'][binned_selection],
'binned_size': np.int(np.sum(binned_selection))
'binned_size': int(np.sum(binned_selection))
}

for night in night_dict:
Expand Down
4 changes: 2 additions & 2 deletions SLOPpy/transmission_spectrum_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def compute_transmission_spectrum_average(config_in, lines_label, reference='pla
'range': line_iter_dict['range'],
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
'binned_wave': shared_data['binned']['wave'][binned_selection],
'binned_step': shared_data['binned']['step'][binned_selection],
'binned_size': np.int(np.sum(binned_selection))
'binned_size': int(np.sum(binned_selection))
}

results_list = ['user',
Expand Down
4 changes: 2 additions & 2 deletions SLOPpy/write_output_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ def write_output_transmission(config_in, reference='planetRF', night_input='', p
'range': range_temp,
'wave': shared_data['coadd']['wave'][shared_selection],
'step': shared_data['coadd']['step'][shared_selection],
'size': np.int(np.sum(shared_selection)),
'size': int(np.sum(shared_selection)),
'binned_wave': shared_data['binned']['wave'][binned_selection],
'binned_step': shared_data['binned']['step'][binned_selection],
'binned_size': np.int(np.sum(binned_selection))
'binned_size': int(np.sum(binned_selection))
}

else:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
},
zip_safe=False,
install_requires=[
'numpy>=1.22',
'numba>=0.55.2',
'numpy>=1.26.4',
'numba>=0.59.1',
'scipy>=1.8.1',
'matplotlib>=3.5.2',
'astropy>=5.1',
Expand Down

0 comments on commit 64e1598

Please sign in to comment.