diff --git a/requirements.txt b/requirements.txt index d9e8f537..dc3fac9d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ astropy -astroquery +astroquery>=0.4.8.dev9474 # 2024-09-24 pinned for Gaia column capitalization issue IPython matplotlib -numpy +numpy==1.26.4 # temporary for build test jupyter scipy notebook -spectral-cube @ git+https://github.com/radio-astro-tools/spectral-cube # as of: 2021-09-21 +spectral-cube radio-beam reproject dust_extinction diff --git a/tutorials/color-excess/color-excess.ipynb b/tutorials/color-excess/color-excess.ipynb index 4380d2e5..337238d1 100644 --- a/tutorials/color-excess/color-excess.ipynb +++ b/tutorials/color-excess/color-excess.ipynb @@ -201,7 +201,7 @@ "outputs": [], "source": [ "download_dir = pathlib.Path('~/.astropy/cache/astroquery/Mast').expanduser()\n", - "download_dir.mkdir(exist_ok=True)\n", + "download_dir.mkdir(exist_ok=True, parents=True)\n", "\n", "obsTable = Observations.query_object(\"HD 147933\", radius=\"1 arcsec\")\n", "obsTable_spec = obsTable[obsTable['dataproduct_type'] == 'spectrum']\n", @@ -214,7 +214,10 @@ "metadata": {}, "outputs": [], "source": [ - "obsids = obsTable_spec[39]['obsid']\n", + "# retrieve a specific 'obs_id' corresponding to the IUE spectrum\n", + "obsTable_spec.add_index('obs_id')\n", + "obsids = obsTable_spec.loc['lwr05639']['obsid']\n", + "\n", "dataProductsByID = Observations.get_product_list(obsids)\n", "manifest = Observations.download_products(dataProductsByID, \n", " download_dir=str(download_dir))" @@ -268,11 +271,11 @@ "outputs": [], "source": [ "custom_query = Simbad()\n", - "custom_query.add_votable_fields('fluxdata(U)','fluxdata(B)','fluxdata(V)')\n", + "custom_query.add_votable_fields('U','B','V')\n", "phot_table=custom_query.query_object('HD 147933')\n", - "Umag=phot_table['FLUX_U']\n", - "Bmag=phot_table['FLUX_B']\n", - "Vmag=phot_table['FLUX_V']" + "Umag=phot_table['U']\n", + "Bmag=phot_table['B']\n", + "Vmag=phot_table['V']" ] }, { diff --git a/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb b/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb index 68685e15..5558ffe4 100644 --- a/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb +++ b/tutorials/spectral-cube-reprojection/SpectralCubeReprojectExample.ipynb @@ -523,7 +523,14 @@ "metadata": {}, "outputs": [], "source": [ - "cube2vel_reproj = cube2vel_spatialspectralsmooth.reproject(cube1vel.header)\n", + "# first we make a copy of the target (cube1vel) header and set its rest frequency \n", + "# to that of the cube we're reprojecting (cube2vel_spatialspectralsmooth)\n", + "# (see https://github.com/radio-astro-tools/spectral-cube/issues/874)\n", + "tgthdr = cube1vel.header\n", + "tgthdr['RESTFRQ'] = cube2vel_spatialspectralsmooth.header['RESTFRQ']\n", + "\n", + "# now we continue with the reprojection\n", + "cube2vel_reproj = cube2vel_spatialspectralsmooth.reproject(tgthdr)\n", "cube2vel_reproj" ] }, @@ -615,7 +622,7 @@ " cube2daskvel_spectralresample = cube2daskvel_smooth.spectral_interpolate(cube1vel.spectral_axis,\n", " suppress_smooth_warning=True)\n", " cube2daskvel_spatialspectralsmooth = cube2daskvel_spectralresample.convolve_to(common_beam)\n", - " cube2daskvel_reproj = cube2daskvel_spatialspectralsmooth.reproject(cube1vel.header)\n", + " cube2daskvel_reproj = cube2daskvel_spatialspectralsmooth.reproject(tgthdr) # as above, tgthdr is altered cube1vel header\n", "cube2daskvel_reproj" ] }, diff --git a/tutorials/vo/conesearch.ipynb b/tutorials/vo/conesearch.ipynb index a671c76d..e16b141b 100755 --- a/tutorials/vo/conesearch.ipynb +++ b/tutorials/vo/conesearch.ipynb @@ -243,7 +243,10 @@ "outputs": [], "source": [ "my_db = vos_catalog.get_remote_catalog_db(conf.conesearch_dbname)\n", - "my_cat = my_db.get_catalog_by_url(result.url + '&')\n", + "try:\n", + " my_cat = my_db.get_catalog_by_url(result.url)\n", + "except AttributeError:\n", + " my_cat = my_db.get_catalog_by_url(result.url + '&')\n", "print(my_cat.dumps())" ] },