You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for index, row in stars.iterrows():
ra = row['ra']
dec = row['dec']
constraints = {'ra': [ra, ra], 'dec': [dec, dec], 'data_release': ['DESI-EDR']}
found = client.find(constraints=constraints, outfields=['sparcl_id'], limit=None)
if found.records:
for record in found.records:
results = client.retrieve(uuid_list=[record.sparcl_id], include=['flux', 'wavelength'])
flux = results.records[0].flux
wavelength = results.records[0].wavelength
plt.figure()
plt.plot(wavelength, flux)
plt.xlabel('Wavelength (Angstrom)')
plt.ylabel('Flux')
plt.title(f'Spectrum for RA: {ra}, Dec: {dec}')
plt.savefig(os.path.join(png_folder, f"{ra}_{dec}.png"))
plt.close()
else:
print(f"No spectra found for RA: {ra}, Dec: {dec}")
`
Excuse me, where should I specify to query the 'DESI-ADR' dataset?
Can you provide a tutorial on cross referencing DESI spectra based on "ra dec",please?
The text was updated successfully, but these errors were encountered:
Please note also that we have a helpdesk where you can find previous questions and answers, and also submit new questions: https://datalab.noirlab.edu/help/
Please don't hesitate to contact us again if you require more help.
`from sparcl.client import SparclClient
import pandas as pd
import matplotlib.pyplot as plt
import os
client = SparclClient()
print(client.all_datasets)
help(client.find)
stars = pd.read_csv("Z:\Blue straggler\ra_dec_match.csv", header=None, names=["ra", "dec"])
fits_folder = "Z:\Blue straggler\DESI\FITS"
png_folder = "Z:\Blue straggler\DESI\PNG"
os.makedirs(fits_folder, exist_ok=True)
os.makedirs(png_folder, exist_ok=True)
for index, row in stars.iterrows():
ra = row['ra']
dec = row['dec']
`
Excuse me, where should I specify to query the 'DESI-ADR' dataset?
Can you provide a tutorial on cross referencing DESI spectra based on "ra dec",please?
The text was updated successfully, but these errors were encountered: