Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions pyLIMA/pyLIMASS/pyLIMASS.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import astropy.units as u
import numpy as np
import pkg_resources
import scipy.interpolate as si
import scipy.optimize as so
import sklearn.mixture as skmix
Expand All @@ -9,17 +8,15 @@
from astropy.table import QTable

from pyLIMA.priors.parameters_priors import UniformDistribution
from pyLIMA.data import PACKAGE_DATA

ISOCHRONES_HEADER = ['Fe', 'logAge', 'logMass', 'logL', 'logTe', 'logg', 'mbolmag',
'Umag', 'Bmag', 'Vmag', 'Rmag', 'Imag', 'Jmag', 'Hmag', 'Kmag',
'umag', 'gmag', 'rmag', 'imag', 'zmag', 'Gmag', 'G_BPmag',
'G_RPmag', 'F062mag', 'F087mag', 'F106mag', 'F129mag', 'F158mag',
'F184mag', 'F146mag', 'F213mag']

resource_path = '/'.join(('data', 'Roman_Filters.dat'))
template = pkg_resources.resource_filename('pyLIMA', resource_path)

ROMAN_FILTERS_RESPONSE = np.loadtxt(template)
ROMAN_FILTERS_RESPONSE = np.loadtxt(PACKAGE_DATA / 'Roman_Filters.dat')

ROMAN_FILTERS_RESPONSE = QTable(ROMAN_FILTERS_RESPONSE,
names=['wavelength'] + ['F062mag', 'F087mag', 'F106mag',
Expand Down Expand Up @@ -318,10 +315,7 @@

def load_isochrones(self, mass_limits=[0,2],age_limits=[9,12],logg_limits=[0,6]):

resource_path = '/'.join(('data', 'Bressan_Isochrones.dat'))
template = pkg_resources.resource_filename('pyLIMA', resource_path)

ISO = np.loadtxt(template, dtype=str)[1:].astype(float)
ISO = np.loadtxt(PACKAGE_DATA / 'Bressan_Isochrones.dat', dtype=str)[1:].astype(float)
ISO[:, 2] = np.log10(ISO[:, 2])

ISO = QTable(ISO, names=ISOCHRONES_HEADER)
Expand Down Expand Up @@ -550,7 +544,7 @@
mags_baseline.append(-999)

else:

flux_source = 10 ** ((27.4 - mags_s[ind_mag]) / 2.5)
flux_lens = 10 ** ((27.4 - mags_l[ind_mag]) / 2.5)

Expand All @@ -573,8 +567,8 @@

mu_rel_vector_hel = (None, None)
log_10_mu_rel_hel = None
mu_hel_s = (None,None)

Check failure on line 570 in pyLIMA/pyLIMASS/pyLIMASS.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (F841)

pyLIMA/pyLIMASS/pyLIMASS.py:570:13: F841 Local variable `mu_hel_s` is assigned to but never used

Check failure on line 570 in pyLIMA/pyLIMASS/pyLIMASS.py

View workflow job for this annotation

GitHub Actions / build (3.9)

Ruff (F841)

pyLIMA/pyLIMASS/pyLIMASS.py:570:13: F841 Local variable `mu_hel_s` is assigned to but never used
mu_hel_l = (None,None)

Check failure on line 571 in pyLIMA/pyLIMASS/pyLIMASS.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (F841)

pyLIMA/pyLIMASS/pyLIMASS.py:571:13: F841 Local variable `mu_hel_l` is assigned to but never used

Check failure on line 571 in pyLIMA/pyLIMASS/pyLIMASS.py

View workflow job for this annotation

GitHub Actions / build (3.9)

Ruff (F841)

pyLIMA/pyLIMASS/pyLIMASS.py:571:13: F841 Local variable `mu_hel_l` is assigned to but never used

observables = {'log10(M_s)': log10_M_s,
'log10(D_s)': log10_D_s,
Expand Down
Loading