Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lightcurver/processes/roi_modelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
10 changes: 9 additions & 1 deletion lightcurver/utilities/absolute_magnitudes_from_panstarrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [
"pyyaml",
"matplotlib",
"astropy",
"numpy < 2.0.0",
"numpy >= 2.0.0",
"sep",
"scipy",
"ephem",
Expand All @@ -25,9 +25,6 @@ dependencies = [
"astroscrappy",
"starred-astro >= 1.4.7",
"pytest",
"numpy",
"scipy",
"h5py",
"photutils",
"astroalign",
"ruamel.yaml",
Expand Down
Loading