Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more small linting edits
Browse files Browse the repository at this point in the history
Julie Imig committed Jan 6, 2025
1 parent 7daa355 commit 8ecf66d
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions notebooks/SDSS/APOGEE_TESS_tutorial/APOGEE_TESS_tutorial.ipynb
Original file line number Diff line number Diff line change
@@ -613,23 +613,20 @@
" \n",
" plt.colorbar(im, ax=ax1, location='bottom', label='Metallicity [Fe/H]')\n",
" \n",
" \n",
" # Plot the specific star\n",
" indx = np.where(allstar['APOGEE_ID'] == apogee_spec[4].data['APOGEE_ID'][0])[0][0]\n",
" if allstar['TEFF'][indx]: # if the star has valid apogee parameters\n",
" ax1.scatter(allstar['TEFF'][indx], allstar['LOGG'][indx],c=allstar['FE_H'][indx],\n",
" marker='*',s=1000, cmap='jet', edgecolor='k', lw=2,\n",
" vmin=-1,vmax=0.5, zorder=5, label='APOGEE Parameters')\n",
" ax1.scatter(allstar['TEFF'][indx], allstar['LOGG'][indx], c=allstar['FE_H'][indx],\n",
" marker='*', s=1000, cmap='jet', edgecolor='k', lw=2,\n",
" vmin=-1, vmax=0.5, zorder=5, label='APOGEE Parameters')\n",
" else: # params from aspcapstar (uncalibrated)\n",
" print('WARNING: Quality Warning Flags on ASPCAP star parameters. ASPCAP parameters may not be reliable for this star.')\n",
" ax1.scatter(apogee_spec[4].data['FPARAM'][0][0], apogee_spec[4].data['FPARAM'][0][1], c=apogee_spec[4].data['FPARAM'][0][3],\n",
" marker='*', s=1000, cmap='jet', edgecolor='k', lw=2, vmin=-1, vmax=0.5, zorder=5, label='APOGEE Parameters')\n",
" \n",
" \n",
" \n",
" \n",
" # Labels and titles\n",
" ax1.set_xlim(7000, 3000)\n",
" ax1.set_ylim(5.5 -0.5)\n",
" ax1.set_ylim(5.5, -0.5)\n",
" ax1.set_xlabel(r'Effective Temperature [$T_{\\rm{eff}}$, K]')\n",
" ax1.set_ylabel(r'Surface Gravity [$\\log(g)$]')\n",
" ax1.grid()\n",
@@ -651,10 +648,9 @@
" # Plot the model spectrum\n",
" ax2.plot(apogee_wls[pixel_mask], model_flux[pixel_mask], c='darkred', label='Best Fit Model Spectrum')\n",
" \n",
" \n",
" # Set axes limits\n",
" ax2.set_ylim(0.6,1.1)\n",
" ax2.set_xlim(np.min(apogee_wls),np.max(apogee_wls))\n",
" ax2.set_ylim(0.6, 1.1)\n",
" ax2.set_xlim(np.min(apogee_wls), np.max(apogee_wls))\n",
" \n",
" apogee_id = apogee_spec[4].data['APOGEE_ID'][0] # String containing star's name\n",
" ax2.set_title(f\"APOGEE Spectrum - {apogee_id}\")\n",
@@ -762,11 +758,10 @@
" radius=(1/60/60)*u.deg, # search within 1 arcsecond\n",
" obs_collection='TESS', # Search for TESS observations\n",
" intentType='science', # Select only Science observations (not calibration files)\n",
" dataproduct_type = 'timeseries', dataURL = \"*lc.fits\") # Search for time series data (light curves)\n",
"\n",
" dataproduct_type='timeseries', dataURL=\"*lc.fits\") # Search for time series data (light curves)\n",
"\n",
" # Pick closest match by distance\n",
" tess_obs=tess_obs[np.argmin(tess_obs['distance'])]\n",
" tess_obs = tess_obs[np.argmin(tess_obs['distance'])]\n",
"\n",
" # Download TESS Light Curve\n",
" print(\"Downloading TESS Data...\")\n",

0 comments on commit 8ecf66d

Please sign in to comment.