Data Access issue

We are in the process of updating those notebooks for workflows that are relevant for Fornax.

There are multiple ways of doing this. First we update the links to the light curve files.

rxtedata = "s3://nasa-heasarc/rxte/data/archive"
filenames = []
for (k,val) in enumerate(tqdm(ids['obsid'], total=len(ids))):
    fname = "{}/AO{}/P{}/{}/stdprod/xp{}_n2a.lc.gz".format(
        rxtedata,
        ids['cycle'][k],
        ids['prnb'][k],
        ids['obsid'][k],
        ids['obsid'][k].replace('-',''))
    filenames.append(fname)

Now, you can either download them using the aws command line like above, or better, access them directly with astropy.fits.io:

(Note: this step may require installing s3fs with pip install s3fs in the heasoft environment)

# In the next cell, add a try-catch in case the file does not exists.
# With fsspec, we can open the s3 link directly.
lcurves = []
for file in tqdm(filenames):
    try:
        with fits.open(file, use_fsspec=True, fsspec_kwargs={"anon": True}) as hdul:
            data = hdul[1].data
            lcurves.append(data)
        plt.plot(data['TIME'], data['RATE'])
    except:
        pass  
1 Like