From 59d8286a516dffbb06e9b2a6555e2a6f2e0c0bea Mon Sep 17 00:00:00 2001 From: Martin Millon Date: Thu, 26 Mar 2026 10:39:42 +0100 Subject: [PATCH 1/2] package conflict fix --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 753bab1..c291039 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ "pyyaml", "matplotlib", "astropy", - "numpy < 2.0.0", + "numpy >= 2.0.0", "sep", "scipy", "ephem", @@ -25,9 +25,6 @@ dependencies = [ "astroscrappy", "starred-astro >= 1.4.7", "pytest", - "numpy", - "scipy", - "h5py", "photutils", "astroalign", "ruamel.yaml", From 5f8daadd561e7f51c2a7ef400a3b600f7ac1d1c3 Mon Sep 17 00:00:00 2001 From: Martin Millon Date: Thu, 26 Mar 2026 11:27:04 +0100 Subject: [PATCH 2/2] test fixing --- lightcurver/processes/roi_modelling.py | 2 +- .../utilities/absolute_magnitudes_from_panstarrs.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lightcurver/processes/roi_modelling.py b/lightcurver/processes/roi_modelling.py index bd3e15b..4cc6f59 100644 --- a/lightcurver/processes/roi_modelling.py +++ b/lightcurver/processes/roi_modelling.py @@ -174,7 +174,7 @@ def do_modelling_of_roi(): if not unique_subsampling: logger.error(message + ' Stopping the pipeline.') assert np.unique(subsampling_factor).size == 1, message - subsampling_factor = int(subsampling_factor[0]) + subsampling_factor = int(np.unique(subsampling_factor)[0]) im_size_x, im_size_y = data.shape[1:] epochs = data.shape[0] diff --git a/lightcurver/utilities/absolute_magnitudes_from_panstarrs.py b/lightcurver/utilities/absolute_magnitudes_from_panstarrs.py index 37a1430..de60aa0 100644 --- a/lightcurver/utilities/absolute_magnitudes_from_panstarrs.py +++ b/lightcurver/utilities/absolute_magnitudes_from_panstarrs.py @@ -69,9 +69,17 @@ def search_panstarrs_around_coordinates(gaia_id): """ ra, dec = execute_sqlite_query('SELECT ra, dec FROM stars WHERE gaia_id = ?', (gaia_id, ))[0] + logger = logging.getLogger('lightcurver.search_panstarrs_around_coordinates') coord = SkyCoord(ra=ra * u.deg, dec=dec * u.deg, frame='icrs') radius = 1.5 * u.arcsecond # this is generous given the magnitude of the proper motion of most stars. - result = Catalogs.query_region(coord, radius=radius, catalog="PanSTARRS", data_release="dr2") + try: + result = Catalogs.query_region(coord, radius=radius, catalog="PanSTARRS", data_release="dr2") + except ValueError as e: + # The MAST API occasionally returns 'None' strings in float columns, which astroquery + # fails to convert. Treat this as no result found. + logger.warning(f"PanSTARRS query failed for ra={ra}, dec={dec} with error: {e}. Returning empty result.") + from astropy.table import Table + return Table() return result