Skip to content

Commit 27221d7

Browse files
authored
Merge branch 'main' into minor_dev
2 parents 1adf5ef + 8ddef0d commit 27221d7

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

lightcurver/processes/roi_modelling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def do_modelling_of_roi():
174174
if not unique_subsampling:
175175
logger.error(message + ' Stopping the pipeline.')
176176
assert np.unique(subsampling_factor).size == 1, message
177-
subsampling_factor = int(subsampling_factor[0])
177+
subsampling_factor = int(np.unique(subsampling_factor)[0])
178178
im_size_x, im_size_y = data.shape[1:]
179179
epochs = data.shape[0]
180180

lightcurver/utilities/absolute_magnitudes_from_panstarrs.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,17 @@ def search_panstarrs_around_coordinates(gaia_id):
6969
"""
7070
ra, dec = execute_sqlite_query('SELECT ra, dec FROM stars WHERE gaia_id = ?', (gaia_id, ))[0]
7171

72+
logger = logging.getLogger('lightcurver.search_panstarrs_around_coordinates')
7273
coord = SkyCoord(ra=ra * u.deg, dec=dec * u.deg, frame='icrs')
7374
radius = 1.5 * u.arcsecond # this is generous given the magnitude of the proper motion of most stars.
74-
result = Catalogs.query_region(coord, radius=radius, catalog="PanSTARRS", data_release="dr1")
75+
try:
76+
result = Catalogs.query_region(coord, radius=radius, catalog="PanSTARRS", data_release="dr1")
77+
except ValueError as e:
78+
# The MAST API occasionally returns 'None' strings in float columns, which astroquery
79+
# fails to convert. Treat this as no result found.
80+
logger.warning(f"PanSTARRS query failed for ra={ra}, dec={dec} with error: {e}. Returning empty result.")
81+
from astropy.table import Table
82+
return Table()
7583
return result
7684

7785

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"pyyaml",
1515
"matplotlib",
1616
"astropy",
17-
"numpy < 2.0.0",
17+
"numpy >= 2.0.0",
1818
"sep",
1919
"scipy",
2020
"ephem",
@@ -25,9 +25,6 @@ dependencies = [
2525
"astroscrappy",
2626
"starred-astro >= 1.4.7",
2727
"pytest",
28-
"numpy",
29-
"scipy",
30-
"h5py",
3128
"photutils",
3229
"astroalign",
3330
"ruamel.yaml",

0 commit comments

Comments
 (0)