Calibration Without Noise Diodes (calseq)#
This tutorial shows how to use GBTFITSLoad.calseq to derive the system temperature for observations taken with the W-Band receiver of the GBT. The W-Band receiver has two feeds (beams) and covers the frequency range from 67 to 92 GHz, and, unlike most of the GBT receivers, it does not have noise diodes for calibration. Instead it uses a wheel to put hot and cold loads in front of the receiver, in what we call a calibration sequence (calseq). For the other spectral line receiver that does not use noise, Argus, the command used to compute the system temperature is GBTFITSLoad.vanecal, because Argus uses a vane instead of a wheel. An example showing how to use vanecal will be provided elsewhere.
The data in this example contains observations of M82 using the Nod observing procedure.
You can find a copy of this tutorial as a Jupyter notebook here or download it by right clicking here and selecting “Save Link As”.
Loading Modules#
We start by loading the modules we will use for the data reduction.
For display purposes, we use the static (non-interactive) matplotlib backend in this tutorial. However, you can tell matplotlib to use the ipympl backend to enable interactive plots. This is only needed if working on jupyter lab or notebook.
# Set interactive plots in jupyter.
#%matplotlib ipympl
# These modules are required for the data reduction.
from dysh.fits import GBTFITSLoad
from astropy import units as u
import numpy as np
import matplotlib.pyplot as plt
# These modules are only used to download the data.
from pathlib import Path
from dysh.util.download import from_url
Data Retrieval#
Download the example SDFITS data, if necessary.
url = "http://www.gb.nrao.edu/dysh/example_data/nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits"
savepath = Path.cwd() / "data"
savepath.mkdir(exist_ok=True) # Create the data directory if it does not exist.
filename = from_url(url, savepath)
Data Loading#
Next, we use GBTFITSLoad to load the data, and then its summary method to inspect its contents.
sdfits = GBTFITSLoad(filename)
sdfits.summary()
| SCAN | OBJECT | VELOCITY | PROC | PROCSEQN | RESTFREQ | DOPFREQ | # IF | # POL | # INT | # FEED | AZIMUTH | ELEVATION |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 130 | M82 | 0.0 | CALSEQ | 1 | 87.645 | 86.4 | 4 | 2 | 3 | 2 | 334.3782 | 46.5595 |
| 131 | M82 | 0.0 | Nod | 1 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.3555 | 46.4977 |
| 132 | M82 | 0.0 | Nod | 2 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.4400 | 46.3994 |
| 133 | M82 | 0.0 | Nod | 1 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.2819 | 46.2979 |
| 134 | M82 | 0.0 | Nod | 2 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.3704 | 46.1996 |
| 135 | M82 | 0.0 | Nod | 1 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.2152 | 46.0993 |
| 136 | M82 | 0.0 | Nod | 2 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.3061 | 46.0009 |
| 137 | M82 | 0.0 | Nod | 1 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.1520 | 45.9003 |
| 138 | M82 | 0.0 | Nod | 2 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.2438 | 45.8002 |
| 139 | M82 | 0.0 | Nod | 1 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.0929 | 45.6982 |
| 140 | M82 | 0.0 | Nod | 2 | 87.645 | 86.4 | 4 | 2 | 1 | 2 | 334.1845 | 45.5991 |
| 141 | M82 | 0.0 | CALSEQ | 1 | 87.645 | 86.4 | 4 | 2 | 3 | 2 | 334.0287 | 45.4683 |
There are 12 scans in this dataset. Using four spectral windows, two feeds and two polarizations. There are two calseq procedures at the start and end of the observation, and in between a series of five Nod observations.
Data Reduction#
System Temperature#
To calibrate the data we need to know the system temperature during the observations. We use the GBTFITSLoad.calseq function to derive the system temperature from the CALSEQ observations. We do this for both feeds, the four spectral windows, and both polarizations.
fdnums = sdfits.udata("FDNUM") # Feeds.
ifnums = sdfits.udata("IFNUM") # Spectral windows.
plnums = sdfits.udata("PLNUM") # Polarizations.
cscans = [130, 141] # calseq scan numbers.
# Create an array to store the system temperature for each combination.
tsys = np.empty((len(cscans), len(fdnums), len(plnums), len(ifnums)), dtype=float)
# Loop over the combinations.
for s,scan in enumerate(cscans):
for f,fdnum in enumerate(fdnums):
for p,plnum in enumerate(plnums):
for i,ifnum in enumerate(ifnums):
tsys[s,f,p,i], _ = sdfits.calseq(scan=scan, fdnum=fdnum, plnum=plnum, ifnum=ifnum)
We check how much the system temperature changed between the start and end of the observations. We evaluate this in the form of a percentage relative to the time average of the system temperature.
np.diff(tsys, axis=0)/np.mean(tsys, axis=0)*100
array([[[[2.08003476, 2.02072715, 2.01032736, 1.98261722],
[2.23027447, 2.34131744, 1.97051881, 1.88567422]],
[[2.18519033, 2.10316583, 2.0706225 , 2.08775978],
[2.25817581, 2.19362631, 2.21031971, 2.1263665 ]]]])
From the above we see that the system temperature changed by \(\approx2\%\). We will take the mean of the system temperatures as a function of time for the calibration.
tsys = np.mean(tsys, axis=0)
Nod Calibration#
Now we proceed to calibrate the Nod observations. We will use a similar startegy as before, looping over the possible combinations of spectral window, polarization and feeds. However, we will time average the calibrated data, so in the end we will only have one spectrum per spectral window and polarization. Since the data is observed using Nod, the processing will combine the spectra for both beams. The scans we calibrate are all the Nod scans, but we only need to provide the number of one of them per pair, since dysh will automatically figure out which scan is the corresponding pair.
The spectra we will save are Spectrum objects, so we set the data type, dtype, of the array to object.
In the call to GBTFITSLoad.getnod we must provide a value for the system temperature, one for each beam. In this case, the system temperature for each beam must be in a separate list, like [[120],[160]], where the first feed would use a system temperature of 120 K and the second 160 K. So we take the two system temperatures an pack them into a list or lists before calling the calibration function getnod.
nod_ta = np.empty((len(plnums), len(ifnums)), dtype=object)
nod_scans = [131, 133, 135, 137, 139]
for p,plnum in enumerate(plnums):
for i,ifnum in enumerate(ifnums):
# Extract the system temperature for both feeds for this polarization and spectral window.
t_sys = [[t] for t in tsys[:,p,i]]
# Call the calibration function.
nod_ta[p,i] = sdfits.getnod(scan=nod_scans, ifnum=ifnum, plnum=plnum, t_sys=t_sys).timeaverage()
Inspecting the Calibrated Data#
Now that we have calibrated our observations, we plot the results to view the calibrated data. We start by plotting things using the built-in plotting functions for Spectrum objects, then we proceed to plot the spectra using custom matplotlib commands.
In the following cells we will plot one polarization for the individual spectral windows.
nod_ta[0,0].plot()
<dysh.plot.specplot.SpectrumPlot at 0x784f1653eef0>
nod_ta[0,1].plot()
<dysh.plot.specplot.SpectrumPlot at 0x784f1495cdc0>
nod_ta[0,2].plot()
<dysh.plot.specplot.SpectrumPlot at 0x784f149b2c80>
nod_ta[0,3].plot()
<dysh.plot.specplot.SpectrumPlot at 0x784f0f0c88e0>
Now we will plot all of the spectral windows in a single figure. Since we are using matplotlib and it does not know about the units, we must set the labels by hand.
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=0")
ax = fig.add_subplot(111)
for t in nod_ta[0]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(0, 0.4)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(f"Antenna temperature ({t.flux.unit})");
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=1")
ax = fig.add_subplot(111)
for t in nod_ta[1]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(0, 0.4)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(f"Antenna temperature ({t.flux.unit})");
We see that spectral windows 1, 2 and 3 have strong detections of spectral lines. We focus on these spectral windows from now on.
nod_ta_lines = nod_ta[:,[1,2,3]]
Baseline Subtraction#
Now we proceed to remove the baseline from the spectral windows. For this, we will ignore the channels where we see the spectral lines. The ranges we will ignore are: ifnum=1 from 87.2 to 87.3 GHz, ifnum=2 from 88.5 to 88.7 GHz, and for ifnum=3 from 88.5 to 88.7 and 89 to 89.23 GHz. We will also ignore the first and last 500 channels of each spectra. The exclusion regions must be specified as a list of tuples, like [(1,10),(50,100)], and they can include units as well, however, only one unit per exclusion region is supported. We use an order 15 polynomial as the baseline model. This is a high order, but it captures most of the structure on the spectra for both polarizations.
# Define baseline parameters.
order = 15
model = "poly"
edge = 500
exclude = {1: [(nod_ta_lines[0,0].spectral_axis.quantity.min().to("GHz"),
nod_ta_lines[0,0].spectral_axis.quantity[edge].to("GHz")),
(87.2*u.GHz, 87.3*u.GHz),
(nod_ta_lines[0,0].spectral_axis.quantity[-edge].to("GHz"),
nod_ta_lines[0,0].spectral_axis.quantity.max().to("GHz")),
],
2: [(nod_ta_lines[0,1].spectral_axis.quantity.min().to("GHz"),
nod_ta_lines[0,1].spectral_axis.quantity[edge].to("GHz")),
(88.5*u.GHz, 88.65*u.GHz),
(nod_ta_lines[0,1].spectral_axis.quantity[-edge].to("GHz"),
nod_ta_lines[0,1].spectral_axis.quantity.max().to("GHz"))
],
3: [(nod_ta_lines[0,2].spectral_axis.quantity.min().to("GHz"),
nod_ta_lines[0,2].spectral_axis.quantity[edge].to("GHz")),
(88.5*u.GHz, 88.7*u.GHz),
(89*u.GHz, 89.23*u.GHz),
(nod_ta_lines[0,2].spectral_axis.quantity[-edge].to("GHz"),
nod_ta_lines[0,2].spectral_axis.quantity.max().to("GHz"))
],
}
# Loop over spectra and remove the baseline.
for nod_ta_lines_p in nod_ta_lines:
for spec in nod_ta_lines_p:
spec.baseline(order, model=model, exclude=exclude[spec.meta["IFNUM"]], remove=True)
Plot again after removing the baseline.
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=0")
ax = fig.add_subplot(111)
for t in nod_ta_lines[0]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(-0.4, 0.4)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(f"Antenna temperature ({t.flux.unit})");
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=1")
ax = fig.add_subplot(111)
for t in nod_ta_lines[1]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(-0.4, 0.4)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(f"Antenna temperature ({t.flux.unit})");
Correcting for Atmospheric Opacity#
So far the calibrated data has been in the antenna temperature scale, which does not take into account the effects of the atmosphere in the temperature scale. To calibrate taking these effects into account we need to specify an opacity and request a different brightness scale. The scales currently supported by dysh are “Ta*” (antenna temperature corrected for atmospheric opacity) and “Jy” (flux density). More details about the calibration can be found in the articles by Kutner & Ulich (1981), Kramer (1997) and Frayer et al. (2019).
If you are working inside the GBO network, in one of the GBO data reduction hosts, then you can use the convenience functions incorporated into dysh to retrieve atmospheric opacity.
from dysh.util.weatherforecast import GBTWeatherForecast
gbwf = GBTWeatherForecast()
spec = nod_ta_lines[0,0]
mjd, freq, tau = gbwf.fetch(vartype="Opacity",
specval=spec.spectral_axis.quantity.mean(),
mjd=spec.obstime.mjd
)
If you are not working at GBO, then you can follow these instructions to figure out the opacity.
If you do not have access to the GBO computing environment, you can use the NRAO helpdesk to ask for opacity values for the GBT. Please specify the dates (accurate to the hour) and frequencies for which you require opacities.
Here we will use the following values, in a dictionary with keys corresponding to the spectral window (IFNUM).
tau = {0: 6.28488304e-02,
1: 5.99070412e-02,
2: 5.73315943e-02,
3: 5.51805677e-02
}
We repeat the calibration specifying the opacity with the zenith_opacity argument and requesting that the data be calibrated to “Ta*” with the units argument.
nod_ta_star = np.empty((len(plnums), len(ifnums)), dtype=object)
nod_scans = [131, 133, 135, 137, 139]
for p,plnum in enumerate(plnums):
for i,ifnum in enumerate(ifnums):
# Extract the system temperature for both feeds for this polarization and spectral window.
t_sys = [[t] for t in tsys[:,p,i]]
# Call the calibration function.
nod_ta_star[p,i] = sdfits.getnod(scan=nod_scans, ifnum=ifnum, plnum=plnum,
t_sys=t_sys,
zenith_opacity=tau[ifnum],
units="Ta*"
).timeaverage()
Note: there is a known bug, where the y-axis will still show antenna temperature, \(T_{A}\), as the y-axis label even after calibrating to \(T_{A}^{*}\). The bug is being tracked here. For now, we specify the y-axis label by hand:
nod_ta_star[0,0].plot(ylabel=r"$T_{A}^{*}$ (K)")
<dysh.plot.specplot.SpectrumPlot at 0x784f1486c040>
Now we repeat the baseline subtraction on the spectral windows that show emission lines.
nod_ta_star_lines = nod_ta_star[:,[1,2,3]]
for nod_ta_star_lines_p in nod_ta_star_lines:
for spec in nod_ta_star_lines_p:
spec.baseline(order, model=model, exclude=exclude[spec.meta["IFNUM"]], remove=True)
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=0")
ax = fig.add_subplot(111)
for t in nod_ta_star_lines[0]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(-0.4, 0.9)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(fr"$T_{{A}}^{{*}}$ ({t.flux.unit})");
fig = plt.figure(dpi=150)
fig.suptitle("PLNUM=1")
ax = fig.add_subplot(111)
for t in nod_ta_star_lines[1]:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(-0.4, 0.9)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(fr"$T_{{A}}^{{*}}$ ({t.flux.unit})");
Polarization Average#
We are now in a position to average the polarizations. This reduces the noise in the spectra. To average spectra we use the Spectrum.average function. It takes as input a list of other Spectrum objects. It does not check if the spectra are repeated.
We create a new array ta_star_pol_ave where we store the polarization averages, and then we loop over the spectra averaging polarizations.
ta_star_pol_ave = np.empty(nod_ta_star_lines.shape[1], dtype=object)
for i in range(nod_ta_star_lines.shape[1]):
ta_star_pol_ave[i] = nod_ta_star_lines[0,i].average(nod_ta_star_lines[1,i])
Plot the polarization averages.
fig = plt.figure(dpi=150)
fig.suptitle("Polarization Average")
ax = fig.add_subplot(111)
for t in ta_star_pol_ave:
# Use an alpha of less than one to see the overlapping regions.
ax.plot(t.spectral_axis.to("GHz"), t.flux, alpha=0.5, label=f"IFNUM={t.meta['IFNUM']}")
# Show a legend.
ax.legend()
# Limit y-range to focus on data.
ax.set_ylim(-0.4, 0.9)
# Set axis labels by hand.
ax.set_xlabel("Frequency (GHz)")
ax.set_ylabel(fr"$T_{{A}}^{{*}}$ ({t.flux.unit})");
Saving the Calibrated Spectra#
Now that we have calibrated our data correcting for atmospheric opacity we save it to FITS files.
First, we create an output directory in the current directory.
products_path = Path.cwd() / "output"
products_path.mkdir(exist_ok=True)
Now loop over spectral windows saving the data.
for spec in ta_star_pol_ave:
fnm_out = products_path / f"M82_ifnum_{spec.meta['IFNUM']}_polavg.fits"
spec.write(fnm_out, format="fits", overwrite=True)
The data is now in FITS tables.
Loading the Calibrated Spectra#
Now that we have saved the calibrated spectra to FITS files, we can read it back in. There are multiple ways of reading back FITS spectra, here we show how to using the built in dysh reader dysh.spectra.Spectrum.read and astropy.io.fits (raw reading).
Reading with dysh#
To read a FITS file written by dysh we use the dysh.spectra.Spectrum.read function. When calling the function we must specify the format of the file, otherwise an error might occur. The following cell will show how to.
from dysh.spectra import Spectrum
read_spec = Spectrum.read(products_path / "M82_ifnum_1_polavg.fits", format="fits")
The result is a Spectrum object, with all its capabilities.
read_spec_smo = read_spec.smooth("gauss", 16)
read_spec_smo.plot()
<dysh.plot.specplot.SpectrumPlot at 0x784f14cb1540>
Even the history is available, albeit not easy to read.
read_spec.history
['2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.__init__(flux=[ nan -0.36238663 -0.40867108 ... 0.27896109 0.26013517 -0.25936472] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : \'FREQ\' \'RA\' \'DEC\' \'STOKES\' CRVAL : 87228489084.0 148.93912373493924 69.63322335271678 -5.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 : 1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2 PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0 1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta=OrderedDict([(\'OBJECT\', \'M82\'), (\'BANDWID\', 1500000000.0), (\'DATE-OBS\', \'2017-02-04T10:11:43.00\'), (\'DURATION\', 60.978172302246094), (\'EXPOSURE\', 596.6629532243182), (\'TSYS\', 108.43573080194732), (\'CTYPE1\', \'FREQ-OBS\'), (\'CRVAL1\', 87228489084.0), (\'CRPIX1\', 8193.0), (\'CDELT1\', 91552.734375), (\'CTYPE2\', \'RA\'), (\'CRVAL2\', 148.93912373493924), (\'CTYPE3\', \'DEC\'), (\'CRVAL3\', 69.63322335271678), (\'CRVAL4\', -5), (\'OBSERVER\', \'Dom Pesce\'), (\'OBSID\', \'unknown\'), (\'SCAN\', 131), (\'OBSMODE\', \'Nod:NONE:TPNOCAL\'), (\'FRONTEND\', \'Rcvr68_92\'), (\'TCAL\', 1.0), (\'VELDEF\', \'OPTI-BAR\'), (\'VFRAME\', 5241.161782043649), (\'RVSYS\', 0.0), (\'OBSFREQ\', 87228489084.0), (\'LST\', 49886.57916905915), (\'AZIMUTH\', 334.4132429832569), (\'ELEVATIO\', 46.497692750558066), (\'TAMBIENT\', 261.45001220703125), (\'PRESSURE\', 699.2300046755845), (\'HUMIDITY\', 0.6909999847412109), (\'RESTFREQ\', 87230000000.0), (\'DOPFREQ\', 86400000000.0), (\'FREQRES\', 91552.734375), (\'EQUINOX\', 2000.0), (\'RADESYS\', \'FK5\'), (\'TRGTLONG\', 148.9695833333333), (\'TRGTLAT\', 69.67944444444444), (\'SAMPLER\', \'B1_0\'), (\'FEED\', 1), (\'SRFEED\', 0), (\'FEEDXOFF\', 0.0), (\'FEEDEOFF\', 0.0), (\'SUBREF_STATE\', 1), (\'SIDEBAND\', \'U\'), (\'PROCSEQN\', 1), (\'PROCSIZE\', 2), (\'PROCSCAN\', \'BEAM1\'), (\'PROCTYPE\', \'SIMPLE\'), (\'LASTON\', 0), (\'LASTOFF\', 0), (\'TIMESTAMP\', \'2017_02_04_10:11:43\'), (\'QD_XEL\', -0.00172575483707228), (\'QD_EL\', 0.001033652915095047), (\'QD_BAD\', 0), (\'QD_METHOD\', \'A\'), (\'VELOCITY\', 0.0), (\'FOFFREF1\', 0.0), (\'ADCSAMPF\', 3000000000.0), (\'VSPDELT\', 512.0), (\'VSPRVAL\', 16.0), (\'VSPRPIX\', 8192.0), (\'SIG\', \'T\'), (\'CAL\', \'F\'), (\'CALTYPE\', \'LOW\'), (\'TWARM\', 263.18359375), (\'TCOLD\', 18.5546875), (\'CALPOSITION\', \'Observing\'), (\'BACKEND\', \'VEGAS\'), (\'PROJID\', \'AGBT15B_244_07\'), (\'TELESCOP\', \'NRAO_GBT\'), (\'SITELONG\', -79.83983), (\'SITELAT\', 38.43312), (\'SITEELEV\', 824.595), (\'IFNUM\', 1), (\'PLNUM\', 1), (\'FDNUM\', 0), (\'INT\', 0), (\'NSAVE\', -1), (\'HDU\', 1), (\'BINTABLE\', 0), (\'ROW\', 54), (\'SIMPLE\', True), (\'EXTEND\', True), (\'DATE\', \'2025-05-27\'), (\'ORIGIN\', \'NRAO Green Bank\'), (\'GUIDEVER\', \'GBTIDL ver2.10.1\'), (\'FITSVER\', \'1.9\'), (\'EXTNAME\', \'SINGLE DISH\'), (\'CTYPE4\', \'STOKES\'), (\'FITSINDEX\', 0), (\'PROC\', \'Nod\'), (\'OBSTYPE\', \'NONE\'), (\'SUBOBSMODE\', \'TPNOCAL\'), (\'CUNIT1\', \'Hz\'), (\'CUNIT2\', \'deg\'), (\'CUNIT3\', \'deg\'), (\'RESTFRQ\', 87230000000.0), (\'BUNIT\', \'K\'), (\'TSCALE\', \'Ta*\'), (\'TSCALFAC\', 3.1324149013977736), (\'MEANTSYS\', 137.11639403753864), (\'WTTSYS\', 137.11639403753864), (\'HISTORY\', [\'2025-09-23T16:54:59 - Project ID: AGBT15B_244_07\', \'2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.__init__(/home/docs/checkouts/readthedocs.org/user_builds/dysh/checko\', \'uts/release-0.8.0b/docs/source/tutorials/examples/data/AGBT15B_244_07.ra\', \'w.vegas.trim.fits,)\', \'2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:00+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:01+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:02+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:03+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:04+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:05+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:06+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:07+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:08+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:09+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:10+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:11+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:12+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:13+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:14+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:15+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:16+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:17+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:18+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:19+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:20+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:21+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:23+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:24+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:25+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:27+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:28+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:33+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.__i\', \'nit__()\', \'2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[108.223\', \'19311690984], [143.53974656603134]],zenith_opacity=0.0599070412,units=Ta\', \'*,)\', \'2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.tim\', \'eaverage()\', \'2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.\', \'__init__(flux=[ -0.07918044 -0.01101403 ... 0.28614533 0.29800\', "831 0.64951328] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : \'FRE", "Q\' \'RA\' \'DEC\' \'STOKES\' CRVAL : 87228489084.0 148.94971760903732 69.6497", \'3954643875 -6.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :\', \'1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2\', \' PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0\', "1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={\'OBJ", "ECT\': \'M82\', \'BANDWID\': 1500000000.0, \'DATE-OBS\': \'2017-02-04T10:11:43.0", "0\', \'DURATION\': 60.978172302246094, \'EXPOSURE\': 298.3314766121591, \'TSYS", "\': 121.02297293054392, \'TDIM7\': \'(16384,1,1,1)\', \'TUNIT7\': \'K\', \'CTYPE1\'", ": \'FREQ-OBS\', \'CRVAL1\': 87228489084.0, \'CRPIX1\': 8193.0, \'CDELT1\': 91552", ".734375, \'CTYPE2\': \'RA\', \'CRVAL2\': 148.94971760903732, \'CTYPE3\': \'DEC\',", "\'CRVAL3\': 69.64973954643875, \'CRVAL4\': -6, \'OBSERVER\': \'Dom Pesce\', \'OBS", "ID\': \'unknown\', \'SCAN\': 131, \'OBSMODE\': \'Nod:NONE:TPNOCAL\', \'FRONTEND\':", "\'Rcvr68_92\', \'TCAL\': 1.0, \'VELDEF\': \'OPTI-BAR\', \'VFRAME\': 5241.161782043", "649, \'RVSYS\': 0.0, \'OBSFREQ\': 87228489084.0, \'LST\': 49886.57916905915, \'", "AZIMUTH\': 334.4132429832569, \'ELEVATIO\': 46.497692750558066, \'TAMBIENT\':", " 261.45001220703125, \'PRESSURE\': 699.2300046755845, \'HUMIDITY\': 0.690999", "9847412109, \'RESTFREQ\': 87230000000.0, \'DOPFREQ\': 86400000000.0, \'FREQRE", "S\': 91552.734375, \'EQUINOX\': 2000.0, \'RADESYS\': \'FK5\', \'TRGTLONG\': 148.9", "695833333333, \'TRGTLAT\': 69.67944444444444, \'SAMPLER\': \'B2_0\', \'FEED\': 1", ", \'SRFEED\': 0, \'FEEDXOFF\': 0.0, \'FEEDEOFF\': 0.0, \'SUBREF_STATE\': 1, \'SID", "EBAND\': \'U\', \'PROCSEQN\': 1, \'PROCSIZE\': 2, \'PROCSCAN\': \'BEAM1\', \'PROCTYP", "E\': \'SIMPLE\', \'LASTON\': 0, \'LASTOFF\': 0, \'TIMESTAMP\': \'2017_02_04_10:11:", "43\', \'QD_XEL\': -0.0017257548370722825, \'QD_EL\': 0.001033652915095047, \'Q", "D_BAD\': 0, \'QD_METHOD\': \'A\', \'VELOCITY\': 0.0, \'FOFFREF1\': 0.0, \'ADCSAMPF", "\': 3000000000.0, \'VSPDELT\': 512.0, \'VSPRVAL\': 16.0, \'VSPRPIX\': 8192.0, \'", "SIG\': \'T\', \'CAL\': \'F\', \'CALTYPE\': \'LOW\', \'TWARM\': 263.18359375, \'TCOLD\':", " 18.5546875, \'CALPOSITION\': \'Observing\', \'BACKEND\': \'VEGAS\', \'PROJID\': \'", "AGBT15B_244_07\', \'TELESCOP\': \'NRAO_GBT\', \'SITELONG\': -79.83983, \'SITELAT", "\': 38.43312, \'SITEELEV\': 824.595, \'IFNUM\': 1, \'PLNUM\': 0, \'FDNUM\': 0, \'I", "NT\': 0, \'NSAVE\': -1, \'HDU\': 1, \'BINTABLE\': 0, \'ROW\': 52, \'SIMPLE\': True,", " \'EXTEND\': True, \'DATE\': \'2025-05-27\', \'ORIGIN\': \'NRAO Green Bank\', \'GUI", "DEVER\': \'GBTIDL ver2.10.1\', \'FITSVER\': \'1.9\', \'EXTNAME\': \'SINGLE DISH\',", "\'CTYPE4\': \'STOKES\', \'FITSINDEX\': 0, \'PROC\': \'Nod\', \'OBSTYPE\': \'NONE\', \'S", "UBOBSMODE\': \'TPNOCAL\', \'CUNIT1\': \'Hz\', \'CUNIT2\': \'deg\', \'CUNIT3\': \'deg\',", " \'RESTFRQ\': 87230000000.0, \'BUNIT\': \'K\', \'TSCALE\': \'Ta*\', \'NAXIS1\': 1638", "4, \'TSCALFAC\': 3.1324149013977736, \'MEANTSYS\': 108.22319311690984, \'WTTS", "YS\': 108.22319311690984},velocity_convention=optical,radial_velocity=0.0", \' km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2\', \'017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8\', \'82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in\', \'km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,\', \' dec, distance) in (deg, deg, kpc) (148.94971761, 69.64973955, 10000\', \'00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km\', \' / s) (0., 0., 0.)>,mask=[ True False False ... False False False],)\', \'2025-09-23T16:55:44+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.\', \'baseline(15,model=poly,exclude=[(<Quantity 86.47848908 GHz>, <Quantity 8\', \'6.52426545 GHz>), (<Quantity 87.2 GHz>, <Quantity 87.3 GHz>), (<Quantity\', \' 87.93271272 GHz>, <Quantity 87.97839753 GHz>)],remove=True,)\', \'2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.\', \'__init__(flux=[ -0.36238663 -0.40867108 ... 0.27896109 0.26013\', "517 -0.25936472] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : \'FRE", "Q\' \'RA\' \'DEC\' \'STOKES\' CRVAL : 87228489084.0 148.93912373493924 69.6332", \'2335271678 -5.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :\', \'1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2\', \' PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0\', "1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={\'OBJ", "ECT\': \'M82\', \'BANDWID\': 1500000000.0, \'DATE-OBS\': \'2017-02-04T10:11:43.0", "0\', \'DURATION\': 60.978172302246094, \'EXPOSURE\': 596.6629532243182, \'TSYS", "\': 108.43573080194732, \'TDIM7\': \'(16384,1,1,1)\', \'TUNIT7\': \'K\', \'CTYPE1\'", ": \'FREQ-OBS\', \'CRVAL1\': 87228489084.0, \'CRPIX1\': 8193.0, \'CDELT1\': 91552", ".734375, \'CTYPE2\': \'RA\', \'CRVAL2\': 148.93912373493924, \'CTYPE3\': \'DEC\',", "\'CRVAL3\': 69.63322335271678, \'CRVAL4\': -5, \'OBSERVER\': \'Dom Pesce\', \'OBS", "ID\': \'unknown\', \'SCAN\': 131, \'OBSMODE\': \'Nod:NONE:TPNOCAL\', \'FRONTEND\':", "\'Rcvr68_92\', \'TCAL\': 1.0, \'VELDEF\': \'OPTI-BAR\', \'VFRAME\': 5241.161782043", "649, \'RVSYS\': 0.0, \'OBSFREQ\': 87228489084.0, \'LST\': 49886.57916905915, \'", "AZIMUTH\': 334.4132429832569, \'ELEVATIO\': 46.497692750558066, \'TAMBIENT\':", " 261.45001220703125, \'PRESSURE\': 699.2300046755845, \'HUMIDITY\': 0.690999", "9847412109, \'RESTFREQ\': 87230000000.0, \'DOPFREQ\': 86400000000.0, \'FREQRE", "S\': 91552.734375, \'EQUINOX\': 2000.0, \'RADESYS\': \'FK5\', \'TRGTLONG\': 148.9", "695833333333, \'TRGTLAT\': 69.67944444444444, \'SAMPLER\': \'B1_0\', \'FEED\': 1", ", \'SRFEED\': 0, \'FEEDXOFF\': 0.0, \'FEEDEOFF\': 0.0, \'SUBREF_STATE\': 1, \'SID", "EBAND\': \'U\', \'PROCSEQN\': 1, \'PROCSIZE\': 2, \'PROCSCAN\': \'BEAM1\', \'PROCTYP", "E\': \'SIMPLE\', \'LASTON\': 0, \'LASTOFF\': 0, \'TIMESTAMP\': \'2017_02_04_10:11:", "43\', \'QD_XEL\': -0.0017257548370722825, \'QD_EL\': 0.001033652915095047, \'Q", "D_BAD\': 0, \'QD_METHOD\': \'A\', \'VELOCITY\': 0.0, \'FOFFREF1\': 0.0, \'ADCSAMPF", "\': 3000000000.0, \'VSPDELT\': 512.0, \'VSPRVAL\': 16.0, \'VSPRPIX\': 8192.0, \'", "SIG\': \'T\', \'CAL\': \'F\', \'CALTYPE\': \'LOW\', \'TWARM\': 263.18359375, \'TCOLD\':", " 18.5546875, \'CALPOSITION\': \'Observing\', \'BACKEND\': \'VEGAS\', \'PROJID\': \'", "AGBT15B_244_07\', \'TELESCOP\': \'NRAO_GBT\', \'SITELONG\': -79.83983, \'SITELAT", "\': 38.43312, \'SITEELEV\': 824.595, \'IFNUM\': 1, \'PLNUM\': 1, \'FDNUM\': 0, \'I", "NT\': 0, \'NSAVE\': -1, \'HDU\': 1, \'BINTABLE\': 0, \'ROW\': 54, \'SIMPLE\': True,", " \'EXTEND\': True, \'DATE\': \'2025-05-27\', \'ORIGIN\': \'NRAO Green Bank\', \'GUI", "DEVER\': \'GBTIDL ver2.10.1\', \'FITSVER\': \'1.9\', \'EXTNAME\': \'SINGLE DISH\',", "\'CTYPE4\': \'STOKES\', \'FITSINDEX\': 0, \'PROC\': \'Nod\', \'OBSTYPE\': \'NONE\', \'S", "UBOBSMODE\': \'TPNOCAL\', \'CUNIT1\': \'Hz\', \'CUNIT2\': \'deg\', \'CUNIT3\': \'deg\',", " \'RESTFRQ\': 87230000000.0, \'BUNIT\': \'K\', \'TSCALE\': \'Ta*\', \'NAXIS1\': 1638", "4, \'TSCALFAC\': 3.1324149013977736, \'MEANTSYS\': 137.11639403753864, \'WTTS", "YS\': 137.11639403753864},velocity_convention=optical,radial_velocity=0.0", \' km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2\', \'017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8\', \'82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in\', \'km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,\', \' dec, distance) in (deg, deg, kpc) (148.93912373, 69.63322335, 10000\', \'00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km\', \' / s) (0., 0., 0.)>,mask=[ True False False ... False False False],)\', \'2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.\', \'average(Spectrum (length=16384) Flux=[ nan -0.04805224 -0.1731664\', \'8 ... 0.28362533 0.24274116 -0.87099997] K, mean=0.00401 K Spec\', \'tral Axis=[8.64784891e+10 8.64785806e+10 8.64786722e+10 ...\', \' 8.79782144e+10 8.79783060e+10 8.79783975e+10] Hz, mean=87228443307.6\', \'3281 Hz,)\'])]),velocity_convention=optical,radial_velocity=0.0 km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (882590.62036715, -4924873.54273607, 3943729.15615663) (v_x, v_y, v_z) in km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra, dec, distance) in (deg, deg, kpc) (148.93912373, 69.63322335, 1000000.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km / s) (0., 0., 0.)>,)',
'2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.smooth(gauss,16,)']
Raw Reading#
To read the file we use the astropy.fits.open function. This will read the FITS file as a data table, not a Spectrum object. This makes it more flexible, but it also requires knowledge about how to work with FITS tables.
We start by importing astropy.fits and then loading the file.
from astropy.io import fits
hdu = fits.open(products_path / "M82_ifnum_1_polavg.fits")
hdu
[<astropy.io.fits.hdu.image.PrimaryHDU object at 0x784f14cb11b0>, <astropy.io.fits.hdu.table.BinTableHDU object at 0x784f146b59c0>]
The data is in the second element of the opened file. We can retrieve the header and table data using the header and data properties.
header = hdu[1].header
data = hdu[1].data
hdu.close() # Close the file for now.
The header contains all the meta data from the Spectrum, as well as the data reduction history.
header
XTENSION= 'BINTABLE' / binary table extension
BITPIX = 8 / array data type
NAXIS = 2 / number of array dimensions
NAXIS1 = 48 / length of dimension 1
NAXIS2 = 16384 / length of dimension 2
PCOUNT = 0 / number of group parameters
GCOUNT = 1 / number of groups
TFIELDS = 6 / number of table fields
TTYPE1 = 'spectral_axis'
TFORM1 = 'D '
TUNIT1 = 'Hz '
TTYPE2 = 'flux '
TFORM2 = 'D '
TUNIT2 = 'K '
TTYPE3 = 'uncertainty'
TFORM3 = 'D '
TTYPE4 = 'weight '
TFORM4 = 'D '
TTYPE5 = 'mask '
TFORM5 = 'K '
TTYPE6 = 'baseline'
TFORM6 = 'D '
TUNIT6 = 'K '
OBJECT = 'M82 '
BANDWID = 1500000000.0
DATE-OBS= '2017-02-04T10:11:43.00'
DURATION= 60.978172302246094
EXPOSURE= 596.6629532243182
TSYS = 108.43573080194732
CTYPE1 = 'FREQ-OBS'
CRVAL1 = 87228489084.0
CRPIX1 = 8193.0
CDELT1 = 91552.734375
CTYPE2 = 'RA '
CRVAL2 = 148.93912373493924
CTYPE3 = 'DEC '
CRVAL3 = 69.63322335271678
CRVAL4 = -5
OBSERVER= 'Dom Pesce'
OBSID = 'unknown '
SCAN = 131
OBSMODE = 'Nod:NONE:TPNOCAL'
FRONTEND= 'Rcvr68_92'
TCAL = 1.0
VELDEF = 'OPTI-BAR'
VFRAME = 5241.161782043649
RVSYS = 0.0
OBSFREQ = 87228489084.0
LST = 49886.57916905915
AZIMUTH = 334.4132429832569
ELEVATIO= 46.497692750558066
TAMBIENT= 261.45001220703125
PRESSURE= 699.2300046755845
HUMIDITY= 0.6909999847412109
RESTFREQ= 87230000000.0
DOPFREQ = 86400000000.0
FREQRES = 91552.734375
EQUINOX = 2000.0
RADESYS = 'FK5 '
TRGTLONG= 148.9695833333333
TRGTLAT = 69.67944444444444
SAMPLER = 'B1_0 '
FEED = 1
SRFEED = 0
FEEDXOFF= 0.0
FEEDEOFF= 0.0
HIERARCH SUBREF_STATE = 1
SIDEBAND= 'U '
PROCSEQN= 1
PROCSIZE= 2
PROCSCAN= 'BEAM1 '
PROCTYPE= 'SIMPLE '
LASTON = 0
LASTOFF = 0
HIERARCH TIMESTAMP = '2017_02_04_10:11:43'
QD_XEL = -0.00172575483707228
QD_EL = 0.001033652915095047
QD_BAD = 0
HIERARCH QD_METHOD = 'A '
VELOCITY= 0.0
FOFFREF1= 0.0
ADCSAMPF= 3000000000.0
VSPDELT = 512.0
VSPRVAL = 16.0
VSPRPIX = 8192.0
SIG = 'T '
CAL = 'F '
CALTYPE = 'LOW '
TWARM = 263.18359375
TCOLD = 18.5546875
HIERARCH CALPOSITION = 'Observing'
BACKEND = 'VEGAS '
PROJID = 'AGBT15B_244_07'
TELESCOP= 'NRAO_GBT'
SITELONG= -79.83983
SITELAT = 38.43312
SITEELEV= 824.595
IFNUM = 1
PLNUM = 1
FDNUM = 0
INT = 0
NSAVE = -1
HDU = 1
BINTABLE= 0
ROW = 54
SIMPLE = T
EXTEND = T
DATE = '2025-05-27'
ORIGIN = 'NRAO Green Bank'
GUIDEVER= 'GBTIDL ver2.10.1'
FITSVER = '1.9 '
EXTNAME = 'SINGLE DISH'
CTYPE4 = 'STOKES '
HIERARCH FITSINDEX = 0
PROC = 'Nod '
OBSTYPE = 'NONE '
HIERARCH SUBOBSMODE = 'TPNOCAL '
CUNIT1 = 'Hz '
CUNIT2 = 'deg '
CUNIT3 = 'deg '
RESTFRQ = 87230000000.0
BUNIT = 'K '
TSCALE = 'Ta* '
TSCALFAC= 3.1324149013977736
MEANTSYS= 137.11639403753864
WTTSYS = 137.11639403753864
HISTORY 2025-09-23T16:54:59 - Project ID: AGBT15B_244_07
HISTORY 2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.__init__(/home/docs/checkouts/readthedocs.org/user_builds/dysh/checko
HISTORY uts/release-0.8.0b/docs/source/tutorials/examples/data/AGBT15B_244_07.ra
HISTORY w.vegas.trim.fits,)
HISTORY 2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:00+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:01+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:02+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:03+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:04+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:05+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:06+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:07+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:08+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:09+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:10+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:11+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:12+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:13+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:14+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:15+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:16+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:17+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:18+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:19+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:20+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:21+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:23+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:24+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:25+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:27+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:28+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:33+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()
HISTORY 2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.__i
HISTORY nit__()
HISTORY 2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[108.223
HISTORY 19311690984], [143.53974656603134]],zenith_opacity=0.0599070412,units=Ta
HISTORY *,)
HISTORY 2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.tim
HISTORY eaverage()
HISTORY 2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
HISTORY __init__(flux=[ -0.07918044 -0.01101403 ... 0.28614533 0.29800
HISTORY 831 0.64951328] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : 'FRE
HISTORY Q' 'RA' 'DEC' 'STOKES' CRVAL : 87228489084.0 148.94971760903732 69.6497
HISTORY 3954643875 -6.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :
HISTORY 1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2
HISTORY PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0
HISTORY 1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={'OBJ
HISTORY ECT': 'M82', 'BANDWID': 1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.0
HISTORY 0', 'DURATION': 60.978172302246094, 'EXPOSURE': 298.3314766121591, 'TSYS
HISTORY ': 121.02297293054392, 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K', 'CTYPE1'
HISTORY : 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1': 91552
HISTORY .734375, 'CTYPE2': 'RA', 'CRVAL2': 148.94971760903732, 'CTYPE3': 'DEC',
HISTORY 'CRVAL3': 69.64973954643875, 'CRVAL4': -6, 'OBSERVER': 'Dom Pesce', 'OBS
HISTORY ID': 'unknown', 'SCAN': 131, 'OBSMODE': 'Nod:NONE:TPNOCAL', 'FRONTEND':
HISTORY 'Rcvr68_92', 'TCAL': 1.0, 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043
HISTORY 649, 'RVSYS': 0.0, 'OBSFREQ': 87228489084.0, 'LST': 49886.57916905915, '
HISTORY AZIMUTH': 334.4132429832569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT':
HISTORY 261.45001220703125, 'PRESSURE': 699.2300046755845, 'HUMIDITY': 0.690999
HISTORY 9847412109, 'RESTFREQ': 87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRE
HISTORY S': 91552.734375, 'EQUINOX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9
HISTORY 695833333333, 'TRGTLAT': 69.67944444444444, 'SAMPLER': 'B2_0', 'FEED': 1
HISTORY , 'SRFEED': 0, 'FEEDXOFF': 0.0, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SID
HISTORY EBAND': 'U', 'PROCSEQN': 1, 'PROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYP
HISTORY E': 'SIMPLE', 'LASTON': 0, 'LASTOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:
HISTORY 43', 'QD_XEL': -0.0017257548370722825, 'QD_EL': 0.001033652915095047, 'Q
HISTORY D_BAD': 0, 'QD_METHOD': 'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ADCSAMPF
HISTORY ': 3000000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, '
HISTORY SIG': 'T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD':
HISTORY 18.5546875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': '
HISTORY AGBT15B_244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT
HISTORY ': 38.43312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 0, 'FDNUM': 0, 'I
HISTORY NT': 0, 'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 52, 'SIMPLE': True,
HISTORY 'EXTEND': True, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUI
HISTORY DEVER': 'GBTIDL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH',
HISTORY 'CTYPE4': 'STOKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'S
HISTORY UBOBSMODE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg',
HISTORY 'RESTFRQ': 87230000000.0, 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 1638
HISTORY 4, 'TSCALFAC': 3.1324149013977736, 'MEANTSYS': 108.22319311690984, 'WTTS
HISTORY YS': 108.22319311690984},velocity_convention=optical,radial_velocity=0.0
HISTORY km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2
HISTORY 017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8
HISTORY 82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in
HISTORY km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,
HISTORY dec, distance) in (deg, deg, kpc) (148.94971761, 69.64973955, 10000
HISTORY 00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km
HISTORY / s) (0., 0., 0.)>,mask=[ True False False ... False False False],)
HISTORY 2025-09-23T16:55:44+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
HISTORY baseline(15,model=poly,exclude=[(<Quantity 86.47848908 GHz>, <Quantity 8
HISTORY 6.52426545 GHz>), (<Quantity 87.2 GHz>, <Quantity 87.3 GHz>), (<Quantity
HISTORY 87.93271272 GHz>, <Quantity 87.97839753 GHz>)],remove=True,)
HISTORY 2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
HISTORY __init__(flux=[ -0.36238663 -0.40867108 ... 0.27896109 0.26013
HISTORY 517 -0.25936472] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : 'FRE
HISTORY Q' 'RA' 'DEC' 'STOKES' CRVAL : 87228489084.0 148.93912373493924 69.6332
HISTORY 2335271678 -5.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :
HISTORY 1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2
HISTORY PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0
HISTORY 1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={'OBJ
HISTORY ECT': 'M82', 'BANDWID': 1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.0
HISTORY 0', 'DURATION': 60.978172302246094, 'EXPOSURE': 596.6629532243182, 'TSYS
HISTORY ': 108.43573080194732, 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K', 'CTYPE1'
HISTORY : 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1': 91552
HISTORY .734375, 'CTYPE2': 'RA', 'CRVAL2': 148.93912373493924, 'CTYPE3': 'DEC',
HISTORY 'CRVAL3': 69.63322335271678, 'CRVAL4': -5, 'OBSERVER': 'Dom Pesce', 'OBS
HISTORY ID': 'unknown', 'SCAN': 131, 'OBSMODE': 'Nod:NONE:TPNOCAL', 'FRONTEND':
HISTORY 'Rcvr68_92', 'TCAL': 1.0, 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043
HISTORY 649, 'RVSYS': 0.0, 'OBSFREQ': 87228489084.0, 'LST': 49886.57916905915, '
HISTORY AZIMUTH': 334.4132429832569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT':
HISTORY 261.45001220703125, 'PRESSURE': 699.2300046755845, 'HUMIDITY': 0.690999
HISTORY 9847412109, 'RESTFREQ': 87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRE
HISTORY S': 91552.734375, 'EQUINOX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9
HISTORY 695833333333, 'TRGTLAT': 69.67944444444444, 'SAMPLER': 'B1_0', 'FEED': 1
HISTORY , 'SRFEED': 0, 'FEEDXOFF': 0.0, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SID
HISTORY EBAND': 'U', 'PROCSEQN': 1, 'PROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYP
HISTORY E': 'SIMPLE', 'LASTON': 0, 'LASTOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:
HISTORY 43', 'QD_XEL': -0.0017257548370722825, 'QD_EL': 0.001033652915095047, 'Q
HISTORY D_BAD': 0, 'QD_METHOD': 'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ADCSAMPF
HISTORY ': 3000000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, '
HISTORY SIG': 'T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD':
HISTORY 18.5546875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': '
HISTORY AGBT15B_244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT
HISTORY ': 38.43312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 1, 'FDNUM': 0, 'I
HISTORY NT': 0, 'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 54, 'SIMPLE': True,
HISTORY 'EXTEND': True, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUI
HISTORY DEVER': 'GBTIDL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH',
HISTORY 'CTYPE4': 'STOKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'S
HISTORY UBOBSMODE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg',
HISTORY 'RESTFRQ': 87230000000.0, 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 1638
HISTORY 4, 'TSCALFAC': 3.1324149013977736, 'MEANTSYS': 137.11639403753864, 'WTTS
HISTORY YS': 137.11639403753864},velocity_convention=optical,radial_velocity=0.0
HISTORY km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2
HISTORY 017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8
HISTORY 82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in
HISTORY km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,
HISTORY dec, distance) in (deg, deg, kpc) (148.93912373, 69.63322335, 10000
HISTORY 00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km
HISTORY / s) (0., 0., 0.)>,mask=[ True False False ... False False False],)
HISTORY 2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
HISTORY average(Spectrum (length=16384) Flux=[ nan -0.04805224 -0.1731664
HISTORY 8 ... 0.28362533 0.24274116 -0.87099997] K, mean=0.00401 K Spec
HISTORY tral Axis=[8.64784891e+10 8.64785806e+10 8.64786722e+10 ...
HISTORY 8.79782144e+10 8.79783060e+10 8.79783975e+10] Hz, mean=87228443307.6
HISTORY 3281 Hz,)
COMMENT --BEGIN-ASTROPY-SERIALIZED-COLUMNS--
COMMENT datatype:
COMMENT - {name: spectral_axis, unit: Hz, datatype: float64, description: Spec\
COMMENT tral axis}
COMMENT - {name: flux, unit: K, datatype: float64, description: Flux}
COMMENT - {name: uncertainty, datatype: float64, description: Flux uncertainty\
COMMENT (was not defined)}
COMMENT - {name: weight, datatype: float64, description: Channel weights}
COMMENT - {name: mask, datatype: int64, description: 'Mask 0=unmasked, 1=maske\
COMMENT d'}
COMMENT - {name: baseline, unit: K, datatype: float64, description: Fitted bas\
COMMENT eline value at given channel (was not defined)}
COMMENT meta:
COMMENT __serialized_columns__: {}
COMMENT --END-ASTROPY-SERIALIZED-COLUMNS--
header["HISTORY"]
2025-09-23T16:54:59 - Project ID: AGBT15B_244_07
2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.__init__(/home/docs/checkouts/readthedocs.org/user_builds/dysh/checko
uts/release-0.8.0b/docs/source/tutorials/examples/data/AGBT15B_244_07.ra
w.vegas.trim.fits,)
2025-09-23T16:54:59+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:00+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:01+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:02+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:03+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:04+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:05+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:06+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:07+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:08+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:09+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:10+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:11+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:12+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:13+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:14+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:15+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:16+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:17+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:18+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:19+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:20+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:21+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:23+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:24+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:25+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:27+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:28+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:33+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2025-09-23T16:55:34+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.__i
nit__()
2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.fits.gbtfitsload.GBTFITSLo
ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[108.223
19311690984], [143.53974656603134]],zenith_opacity=0.0599070412,units=Ta
*,)
2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.scan.ScanBlock.tim
eaverage()
2025-09-23T16:55:35+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
__init__(flux=[ -0.07918044 -0.01101403 ... 0.28614533 0.29800
831 0.64951328] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : 'FRE
Q' 'RA' 'DEC' 'STOKES' CRVAL : 87228489084.0 148.94971760903732 69.6497
3954643875 -6.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :
1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2
PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0
1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={'OBJ
ECT': 'M82', 'BANDWID': 1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.0
0', 'DURATION': 60.978172302246094, 'EXPOSURE': 298.3314766121591, 'TSYS
': 121.02297293054392, 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K', 'CTYPE1'
: 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1': 91552
.734375, 'CTYPE2': 'RA', 'CRVAL2': 148.94971760903732, 'CTYPE3': 'DEC',
'CRVAL3': 69.64973954643875, 'CRVAL4': -6, 'OBSERVER': 'Dom Pesce', 'OBS
ID': 'unknown', 'SCAN': 131, 'OBSMODE': 'Nod:NONE:TPNOCAL', 'FRONTEND':
'Rcvr68_92', 'TCAL': 1.0, 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043
649, 'RVSYS': 0.0, 'OBSFREQ': 87228489084.0, 'LST': 49886.57916905915, '
AZIMUTH': 334.4132429832569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT':
261.45001220703125, 'PRESSURE': 699.2300046755845, 'HUMIDITY': 0.690999
9847412109, 'RESTFREQ': 87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRE
S': 91552.734375, 'EQUINOX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9
695833333333, 'TRGTLAT': 69.67944444444444, 'SAMPLER': 'B2_0', 'FEED': 1
, 'SRFEED': 0, 'FEEDXOFF': 0.0, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SID
EBAND': 'U', 'PROCSEQN': 1, 'PROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYP
E': 'SIMPLE', 'LASTON': 0, 'LASTOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:
43', 'QD_XEL': -0.0017257548370722825, 'QD_EL': 0.001033652915095047, 'Q
D_BAD': 0, 'QD_METHOD': 'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ADCSAMPF
': 3000000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, '
SIG': 'T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD':
18.5546875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': '
AGBT15B_244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT
': 38.43312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 0, 'FDNUM': 0, 'I
NT': 0, 'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 52, 'SIMPLE': True,
'EXTEND': True, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUI
DEVER': 'GBTIDL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH',
'CTYPE4': 'STOKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'S
UBOBSMODE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg',
'RESTFRQ': 87230000000.0, 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 1638
4, 'TSCALFAC': 3.1324149013977736, 'MEANTSYS': 108.22319311690984, 'WTTS
YS': 108.22319311690984},velocity_convention=optical,radial_velocity=0.0
km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2
017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8
82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in
km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,
dec, distance) in (deg, deg, kpc) (148.94971761, 69.64973955, 10000
00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km
/ s) (0., 0., 0.)>,mask=[ True False False ... False False False],)
2025-09-23T16:55:44+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
baseline(15,model=poly,exclude=[(<Quantity 86.47848908 GHz>, <Quantity 8
6.52426545 GHz>), (<Quantity 87.2 GHz>, <Quantity 87.3 GHz>), (<Quantity
87.93271272 GHz>, <Quantity 87.97839753 GHz>)],remove=True,)
2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
__init__(flux=[ -0.36238663 -0.40867108 ... 0.27896109 0.26013
517 -0.25936472] K,wcs=WCS Keywords Number of WCS axes: 4 CTYPE : 'FRE
Q' 'RA' 'DEC' 'STOKES' CRVAL : 87228489084.0 148.93912373493924 69.6332
2335271678 -5.0 CRPIX : 8193.0 0.0 0.0 0.0 PC1_1 PC1_2 PC1_3 PC1_4 :
1.0 0.0 0.0 0.0 PC2_1 PC2_2 PC2_3 PC2_4 : 0.0 1.0 0.0 0.0 PC3_1 PC3_2
PC3_3 PC3_4 : 0.0 0.0 1.0 0.0 PC4_1 PC4_2 PC4_3 PC4_4 : 0.0 0.0 0.0
1.0 CDELT : 91552.734375 1.0 1.0 1.0 NAXIS : 16384 0 0 0,meta={'OBJ
ECT': 'M82', 'BANDWID': 1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.0
0', 'DURATION': 60.978172302246094, 'EXPOSURE': 596.6629532243182, 'TSYS
': 108.43573080194732, 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K', 'CTYPE1'
: 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1': 91552
.734375, 'CTYPE2': 'RA', 'CRVAL2': 148.93912373493924, 'CTYPE3': 'DEC',
'CRVAL3': 69.63322335271678, 'CRVAL4': -5, 'OBSERVER': 'Dom Pesce', 'OBS
ID': 'unknown', 'SCAN': 131, 'OBSMODE': 'Nod:NONE:TPNOCAL', 'FRONTEND':
'Rcvr68_92', 'TCAL': 1.0, 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043
649, 'RVSYS': 0.0, 'OBSFREQ': 87228489084.0, 'LST': 49886.57916905915, '
AZIMUTH': 334.4132429832569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT':
261.45001220703125, 'PRESSURE': 699.2300046755845, 'HUMIDITY': 0.690999
9847412109, 'RESTFREQ': 87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRE
S': 91552.734375, 'EQUINOX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9
695833333333, 'TRGTLAT': 69.67944444444444, 'SAMPLER': 'B1_0', 'FEED': 1
, 'SRFEED': 0, 'FEEDXOFF': 0.0, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SID
EBAND': 'U', 'PROCSEQN': 1, 'PROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYP
E': 'SIMPLE', 'LASTON': 0, 'LASTOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:
43', 'QD_XEL': -0.0017257548370722825, 'QD_EL': 0.001033652915095047, 'Q
D_BAD': 0, 'QD_METHOD': 'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ADCSAMPF
': 3000000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, '
SIG': 'T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD':
18.5546875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': '
AGBT15B_244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT
': 38.43312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 1, 'FDNUM': 0, 'I
NT': 0, 'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 54, 'SIMPLE': True,
'EXTEND': True, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUI
DEVER': 'GBTIDL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH',
'CTYPE4': 'STOKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'S
UBOBSMODE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg',
'RESTFRQ': 87230000000.0, 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 1638
4, 'TSCALFAC': 3.1324149013977736, 'MEANTSYS': 137.11639403753864, 'WTTS
YS': 137.11639403753864},velocity_convention=optical,radial_velocity=0.0
km / s,rest_value=87230000000.0 Hz,observer=<ITRS Coordinate (obstime=2
017-02-04T10:11:43.000, location=(0., 0., 0.) km): (x, y, z) in m (8
82593.9465029, -4924896.36541728, 3943748.74743984) (v_x, v_y, v_z) in
km / s (0., 0., 0.)>,target=<SkyCoord (FK5: equinox=J2000.000): (ra,
dec, distance) in (deg, deg, kpc) (148.93912373, 69.63322335, 10000
00.) (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km
/ s) (0., 0., 0.)>,mask=[ True False False ... False False False],)
2025-09-23T16:55:46+0000 - DYSH v0.8.3 : dysh.spectra.spectrum.Spectrum.
average(Spectrum (length=16384) Flux=[ nan -0.04805224 -0.1731664
8 ... 0.28362533 0.24274116 -0.87099997] K, mean=0.00401 K Spec
tral Axis=[8.64784891e+10 8.64785806e+10 8.64786722e+10 ...
8.79782144e+10 8.79783060e+10 8.79783975e+10] Hz, mean=87228443307.6
3281 Hz,)
The data table contains the spectral axis, flux, mask and other columns which are not used at the moment. For example, if we want to plot the data we can use the following
x = data["spectral_axis"]*1e-9 # Convert to GHz.
y = np.ma.masked_where(data["mask"], data["flux"]) # We need to mask the flux values.
plt.figure(dpi=150)
plt.plot(x, y)
plt.ylabel(r"$T_{A}^{*}$ (K)")
plt.xlabel(r"Frequency (GHz)");