Calibration Without Noise Diodes#

This notebook 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 diodes, 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.

Dysh commands#

The following dysh commands are introduced (leaving out all the function arguments):

  filename = dysh_data()
  sdf = GBTFITSLoad()
  sdf.udata()
  sdf.select()
  sb = sdf.getnod()
  sb = sdf.getps()
  ta = sb.timeaverage()
  ta.baseline()
  ta.average()
  pp = ta.plot()
  tt.oshow(ta1)

Loading Modules#

We start by loading the modules we will use for the data reduction.

# These modules are required for the data reduction.
from dysh.fits import GBTFITSLoad
from dysh.log import init_logging
from astropy import units as u
import numpy as np
import matplotlib.pyplot as plt

# These modules are used for file I/O
from dysh.util.files import dysh_data
from pathlib import Path

Setup#

We start the dysh logging, so we get more information about what is happening. This is only needed if working on a notebook. If using the CLI through the dysh command, then logging is setup for you.

init_logging(2)

# also create a local "output" directory where temporary notebook files can be stored.
output_dir = Path.cwd() / "output"
output_dir.mkdir(exist_ok=True)

Data Retrieval#

Download the example SDFITS data, if necessary.

filename = dysh_data(example="nod3")
23:03:48.733 I Resolving example=nod3 -> nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits
23:03:48.734 I url: http://www.gb.nrao.edu/dysh//example_data/nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits
Downloading AGBT15B_244_07.raw.vegas.trim.fits from http://www.gb.nrao.edu/dysh//example_data/nod-W/data/AGBT15B_244_07.raw.vegas.trim.fits
23:03:49.018 I Starting download...

23:03:58.630 I Saved AGBT15B_244_07.raw.vegas.trim.fits to AGBT15B_244_07.raw.vegas.trim.fits
Retrieved AGBT15B_244_07.raw.vegas.trim.fits

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 # IF # POL # INT # FEED AZIMUTH ELEVATION
130 M82 0.0 CALSEQ 1 87.645 4 2 3 2 334.3782 46.5595
131 M82 0.0 Nod 1 87.645 4 2 1 2 334.3555 46.4977
132 M82 0.0 Nod 2 87.645 4 2 1 2 334.4400 46.3994
133 M82 0.0 Nod 1 87.645 4 2 1 2 334.2819 46.2979
134 M82 0.0 Nod 2 87.645 4 2 1 2 334.3704 46.1996
135 M82 0.0 Nod 1 87.645 4 2 1 2 334.2152 46.0993
136 M82 0.0 Nod 2 87.645 4 2 1 2 334.3061 46.0009
137 M82 0.0 Nod 1 87.645 4 2 1 2 334.1520 45.9003
138 M82 0.0 Nod 2 87.645 4 2 1 2 334.2438 45.8002
139 M82 0.0 Nod 1 87.645 4 2 1 2 334.0929 45.6982
140 M82 0.0 Nod 2 87.645 4 2 1 2 334.1845 45.5991
141 M82 0.0 CALSEQ 1 87.645 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.07996041, 2.02069088, 2.01024058, 1.98262645],
         [2.23058483, 2.34203283, 1.97049038, 1.88568961]],

        [[2.18532318, 2.10310376, 2.07058868, 2.0877803 ],
         [2.25814277, 2.1933681 , 2.21046665, 2.12652005]]]])

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();
../_images/c68ed996a87b87dad0967aa146d1bc408b1ffff021d0a351a05729d11742277e.png
nod_ta[0,1].plot();
../_images/8340066d8c5d8db4a1479127e4b11188b2971b548705b2e8fb5b6ffb4b911adc.png
nod_ta[0,2].plot();
../_images/e2b181daef18e583c500f4db898e31d7beae3759955cb870fb47caabe90d0261.png
nod_ta[0,3].plot();
../_images/d114e87ffc7b94724b6e1ddfeae34bcf233f399acbd80de5f2867e6c626a0a60.png

Now we will plot all of the spectral windows in a single figure. We start with the first polarization.

p0 = nod_ta[0,0].plot(ymin=0.0, ymax=0.4, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=0", label=f"IFNUM={nod_ta[0,0].meta['IFNUM']}")
pl0_specs = nod_ta[0,1:]
p0.oshow(pl0_specs, alpha=[0.5]*len(pl0_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl0_specs])
../_images/413446a586197d878b1c02ed42e0d407ba2f87368209fd798278f7d80b4382d8.png

The same code if you wanted more manual control

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})")
plt.show()

Now the second polarization.

p1 = nod_ta[1,0].plot(ymin=0.0, ymax=0.4, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=1", label=f"IFNUM={nod_ta[1,0].meta['IFNUM']}")
pl1_specs = nod_ta[1,1:]
p1.oshow(pl1_specs, alpha=[0.5]*len(pl0_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl1_specs])
../_images/c688eabe8fa28a41533df3420094b24a8ba94858b2cbdb270b73bb57572972c0.png

The same code if you wanted more manual control

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})")
plt.show()

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)
23:04:33.702 I EXCLUDING [Spectral Region, 1 sub-regions:
  (86478489084.0 Hz, 86524265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (87200000000.0 Hz, 87300000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (87932712716.8125 Hz, 87978397531.26562 Hz) 
]
23:04:33.945 I EXCLUDING [Spectral Region, 1 sub-regions:
  (87308489084.0 Hz, 87354265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88650000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (88762712716.8125 Hz, 88808397531.26562 Hz) 
]
23:04:34.212 I EXCLUDING [Spectral Region, 1 sub-regions:
  (88138489084.0 Hz, 88184265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88700000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89000000000.0 Hz, 89230000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89592712716.8125 Hz, 89638397531.26562 Hz) 
]
23:04:34.462 I EXCLUDING [Spectral Region, 1 sub-regions:
  (86478489084.0 Hz, 86524265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (87200000000.0 Hz, 87300000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (87932712716.8125 Hz, 87978397531.26562 Hz) 
]
23:04:34.557 I EXCLUDING [Spectral Region, 1 sub-regions:
  (87308489084.0 Hz, 87354265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88650000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (88762712716.8125 Hz, 88808397531.26562 Hz) 
]
23:04:34.651 I EXCLUDING [Spectral Region, 1 sub-regions:
  (88138489084.0 Hz, 88184265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88700000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89000000000.0 Hz, 89230000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89592712716.8125 Hz, 89638397531.26562 Hz) 
]

Plot again after removing the baseline.

p0 = nod_ta_lines[0,0].plot(ymin=-0.4, ymax=0.4, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=0", label=f"IFNUM={nod_ta_lines[0,0].meta['IFNUM']}")
pl0_specs = nod_ta_lines[0,1:]
p0.oshow(pl0_specs, alpha=[0.5]*len(pl0_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl0_specs])
../_images/c2a9542df6333e539945d8ae3ecf3dcf63a34d9d31688172a4f7e4d731d12c90.png

The same code if you want more manual control

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})")
plt.show()
p1 = nod_ta_lines[1,0].plot(ymin=-0.4, ymax=0.4, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=1", label=f"IFNUM={nod_ta_lines[0,0].meta['IFNUM']}")
pl1_specs = nod_ta_lines[1,1:]
p1.oshow(pl1_specs, alpha=[0.5]*len(pl1_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl1_specs])
../_images/96e8feaeefb5d4b4106dd662d12e3448f7ca98662ce8602a5dfb933db10520b4.png

The same code if you want more manual control

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})")
plt.show()

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()
nod_ta_star[0,0].plot();
../_images/76d1f88574d7e7174e719b675e6bc584607bb2cc27c22ca9489fd446e9d170c5.png

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)
23:04:49.088 I EXCLUDING [Spectral Region, 1 sub-regions:
  (86478489084.0 Hz, 86524265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (87200000000.0 Hz, 87300000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (87932712716.8125 Hz, 87978397531.26562 Hz) 
]
23:04:49.183 I EXCLUDING [Spectral Region, 1 sub-regions:
  (87308489084.0 Hz, 87354265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88650000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (88762712716.8125 Hz, 88808397531.26562 Hz) 
]
23:04:49.277 I EXCLUDING [Spectral Region, 1 sub-regions:
  (88138489084.0 Hz, 88184265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88700000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89000000000.0 Hz, 89230000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89592712716.8125 Hz, 89638397531.26562 Hz) 
]
23:04:49.373 I EXCLUDING [Spectral Region, 1 sub-regions:
  (86478489084.0 Hz, 86524265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (87200000000.0 Hz, 87300000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (87932712716.8125 Hz, 87978397531.26562 Hz) 
]
23:04:49.468 I EXCLUDING [Spectral Region, 1 sub-regions:
  (87308489084.0 Hz, 87354265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88650000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (88762712716.8125 Hz, 88808397531.26562 Hz) 
]
23:04:49.564 I EXCLUDING [Spectral Region, 1 sub-regions:
  (88138489084.0 Hz, 88184265451.1875 Hz) 
, Spectral Region, 1 sub-regions:
  (88500000000.0 Hz, 88700000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89000000000.0 Hz, 89230000000.0 Hz) 
, Spectral Region, 1 sub-regions:
  (89592712716.8125 Hz, 89638397531.26562 Hz) 
]
p0 = nod_ta_star_lines[0,0].plot(ymin=-0.4, ymax=0.9, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=0", label=f"IFNUM={nod_ta_star_lines[0,0].meta['IFNUM']}")
pl0_specs = nod_ta_star_lines[0,1:]
p0.oshow(pl0_specs, alpha=[0.5]*len(pl0_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl0_specs])
../_images/8d97cb00e24530cd50683bce2381106d2143c0a3dcf4fb4c9716a49ab2903295.png

The same figure could be plotted using the following code:

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})")
plt.show()

Now the second polarization.

p1 = nod_ta_star_lines[1,0].plot(ymin=-0.4, ymax=0.9, xaxis_unit="GHz", alpha=0.5, 
                      title="PLNUM=1", label=f"IFNUM={nod_ta_star_lines[1,0].meta['IFNUM']}")
pl1_specs = nod_ta_star_lines[1,1:]
p1.oshow(pl1_specs, alpha=[0.5]*len(pl1_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in pl1_specs])
../_images/1ce0dc7dd8a6a3f57e30763f221d41c92747db0069f9590c57798777e841664d.png

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.

pa = ta_star_pol_ave[0].plot(ymin=-0.4, ymax=0.9, xaxis_unit="GHz", alpha=0.5, 
                      title="Polarization Average", label=f"IFNUM={nod_ta_star_lines[0,0].meta['IFNUM']}")
avg_specs = ta_star_pol_ave[1:]
pa.oshow(avg_specs, alpha=[0.5]*len(avg_specs), 
         label=[f"IFNUM={s.meta['IFNUM']}" for s in avg_specs])
../_images/b1e71115b04434b34ff4c2b687673d819786ec50f4021aead7e9860d9cade492.png

Saving the Calibrated Spectra#

Now that we have calibrated our data correcting for atmospheric opacity we save it to FITS files.

We use previously defined output directory. We loop over spectral windows saving the data.

for spec in ta_star_pol_ave:
    fnm_out = output_dir / f"M82_ifnum_{spec.meta['IFNUM']}_polavg.fits"
    spec.write(fnm_out, format="fits", overwrite=True)
WARNING: Attribute `ZEROCHAN` of type <class 'float'> cannot be added to FITS Header - skipping [astropy.io.fits.convenience]
WARNING: Attribute `ZEROCHAN` of type <class 'float'> cannot be added to FITS Header - skipping [astropy.io.fits.convenience]
WARNING: Attribute `ZEROCHAN` of type <class 'float'> cannot be added to FITS Header - skipping [astropy.io.fits.convenience]

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(output_dir / "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()
../_images/a916349f9407dbbb3d666e4b42313f337ce4007f17ac3b23250f1ea240ea58b7.png
<dysh.plot.specplot.SpectrumPlot at 0x74e648783100>

Even the history is available, albeit not easy to read. In a resulting FITS file (see below) it will be easier to read.

read_spec.history
['2026-03-16T23:04:53+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.__init__(flux=[        nan -0.38167784 -0.42788408 ...  0.29981571  0.28108434  -0.23835116] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : \'FREQ\' \'RA\' \'DEC\' \'STOKES\'  CRVAL : np.float64(87228489084.0) np.float64(148.93912271827946) np.float64(69.6332217677112) np.float64(1.0)  CRPIX : np.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1_1 PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1.0) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float64(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4_3 PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1.0)  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np.float64(1.0)  NAXIS : 16384  0  0  0,meta=OrderedDict([(\'OBJECT\', \'M82\'), (\'BANDWID\', 1500000000.0), (\'DATE-OBS\', \'2017-02-04T10:11:43.00\'), (\'DURATION\', 609.7817230224609), (\'EXPOSURE\', 596.6629532243182), (\'TSYS\', 108.4373706262882), (\'CTYPE1\', \'FREQ-OBS\'), (\'CRVAL1\', 87228489084.0), (\'CRPIX1\', 8193.0), (\'CDELT1\', 91552.734375), (\'CTYPE2\', \'RA\'), (\'CRVAL2\', 148.93912271827946), (\'CTYPE3\', \'DEC\'), (\'CRVAL3\', 69.6332217677112), (\'CRVAL4\', 1), (\'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.132414901397774), (\'AP_EFF\', 0.35010735602106374), (\'SURF_ERR\', 230.0), (\'SE_UNIT\', \'micron\'), (\'MEANTSYS\', 137.12980829151758), (\'WTTSYS\', 137.12980829151758), (\'TAU_Z\', 0.059907041200000004), (\'HISTORY\', [\'2026-03-16T23:03:58 - Project ID: AGBT15B_244_07\', \'2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.__init__(AGBT15B_244_07.raw.vegas.trim.fits,)\', \'2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.apply_flags()\', \'2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.flag_vegas_spurs()\', \'2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.__i\', \'nit__()\', \'2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo\', \'ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[np.floa\', \'t64(108.22387107748688)], [np.float64(143.54009942913794)]],zenith_opaci\', \'ty=0.0599070412,units=Ta*,)\', \'2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.tim\', \'eaverage()\', \'2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.\', \'__init__(flux=[         -0.07918082 -0.01101417 ...  0.28614683  0.29800\', "966   0.64951734] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : \'FRE", "Q\' \'RA\' \'DEC\' \'STOKES\'  CRVAL : np.float64(87228489084.0) np.float64(148", \'.94971752154765) np.float64(69.64973941003959) np.float64(-6.0)  CRPIX :\', \' np.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1\', \'_1 PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0)\', \'np.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1\', \'.0) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float\', \'64(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4\', \'_3 PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1\', \'.0)  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np\', ".float64(1.0)  NAXIS : 16384  0  0  0,meta={\'OBJECT\': \'M82\', \'BANDWID\':", "1500000000.0, \'DATE-OBS\': \'2017-02-04T10:11:43.00\', \'DURATION\': np.float", "64(304.89086151123047), \'EXPOSURE\': np.float64(298.3314766121591), \'TSYS", "\': np.float64(121.02359518771574), \'TDIM7\': \'(16384,1,1,1)\', \'TUNIT7\': \'", "K\', \'CTYPE1\': \'FREQ-OBS\', \'CRVAL1\': 87228489084.0, \'CRPIX1\': 8193.0, \'CD", "ELT1\': 91552.734375, \'CTYPE2\': \'RA\', \'CRVAL2\': np.float64(148.9497175215", "4765), \'CTYPE3\': \'DEC\', \'CRVAL3\': np.float64(69.64973941003959), \'CRVAL4", "\': -6, \'OBSERVER\': \'Dom Pesce\', \'OBSID\': \'unknown\', \'SCAN\': 131, \'OBSMOD", "E\': \'Nod:NONE:TPNOCAL\', \'FRONTEND\': \'Rcvr68_92\', \'TCAL\': np.float64(1.0)", ", \'VELDEF\': \'OPTI-BAR\', \'VFRAME\': 5241.161782043649, \'RVSYS\': 0.0, \'OBSF", "REQ\': 87228489084.0, \'LST\': 49886.57916905915, \'AZIMUTH\': 334.4132429832", "569, \'ELEVATIO\': 46.497692750558066, \'TAMBIENT\': 261.45001220703125, \'PR", "ESSURE\': 699.2300046755845, \'HUMIDITY\': 0.6909999847412109, \'RESTFREQ\':", "87230000000.0, \'DOPFREQ\': 86400000000.0, \'FREQRES\': 91552.734375, \'EQUIN", "OX\': 2000.0, \'RADESYS\': \'FK5\', \'TRGTLONG\': 148.9695833333333, \'TRGTLAT\':", " 69.67944444444444, \'SAMPLER\': \'B2_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.001725", "7548370722825, \'QD_EL\': 0.001033652915095047, \'QD_BAD\': 0, \'QD_METHOD\':", "\'A\', \'VELOCITY\': 0.0, \'FOFFREF1\': 0.0, \'ZEROCHAN\': nan, \'ADCSAMPF\': 3000", "000000.0, \'VSPDELT\': 512.0, \'VSPRVAL\': 16.0, \'VSPRPIX\': 8192.0, \'SIG\': \'", "T\', \'CAL\': \'F\', \'CALTYPE\': \'LOW\', \'TWARM\': 263.18359375, \'TCOLD\': 18.554", "6875, \'CALPOSITION\': \'Observing\', \'BACKEND\': \'VEGAS\', \'PROJID\': \'AGBT15B", "_244_07\', \'TELESCOP\': \'NRAO_GBT\', \'SITELONG\': -79.83983, \'SITELAT\': 38.4", "3312, \'SITEELEV\': 824.595, \'IFNUM\': 1, \'PLNUM\': 0, \'FDNUM\': 0, \'INT\': 0,", " \'NSAVE\': -1, \'HDU\': 1, \'BINTABLE\': 0, \'ROW\': 52, \'SIMPLE\': True, \'EXTEN", "D\': 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\', \'SUBOBSMO", "DE\': \'TPNOCAL\', \'CUNIT1\': \'Hz\', \'CUNIT2\': \'deg\', \'CUNIT3\': \'deg\', \'RESTF", "RQ\': np.float64(87230000000.0), \'BUNIT\': \'K\', \'TSCALE\': \'Ta*\', \'NAXIS1\':", " 16384, \'TSCALFAC\': np.float64(3.132414901397774), \'AP_EFF\': np.float64(", "0.35010735602106374), \'SURF_ERR\': np.float64(229.99999999999994), \'SE_UN", "IT\': \'micron\', \'MEANTSYS\': np.float64(108.22387107748688), \'WTTSYS\': np.", "float64(108.22387107748688), \'TAU_Z\': np.float64(0.05990704119999998)},v", \'elocity_convention=optical,radial_velocity=0.0 km / s,rest_value=8723000\', \'0000.0 Hz,observer=<ITRS Coordinate (obstime=2017-02-04T10:11:43.000, lo\', \'cation=(0.0, 0.0, 0.0) km): (x, y, z) in m     (882593.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.94971752, 69.64973941, 1000000.)  (pm_ra_cosdec, pm\', \'_dec, radial_velocity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>\', \',mask=[ True False False ... False False False],)\', \'2026-03-16T23:04:49+0000 - DYSH v1.0.1 : 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,)\', \'2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.\', \'__init__(flux=[         -0.38167784 -0.42788408 ...  0.29981571  0.28108\', "434  -0.23835116] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : \'FRE", "Q\' \'RA\' \'DEC\' \'STOKES\'  CRVAL : np.float64(87228489084.0) np.float64(148", \'.93912271827946) np.float64(69.6332217677112) np.float64(1.0)  CRPIX : n\', \'p.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1_1\', \' PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0) np\', \'.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1.0\', \') np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float64\', \'(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4_3\', \' PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1.0\', \')  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np.f\', "loat64(1.0)  NAXIS : 16384  0  0  0,meta={\'OBJECT\': \'M82\', \'BANDWID\': 15", "00000000.0, \'DATE-OBS\': \'2017-02-04T10:11:43.00\', \'DURATION\': np.float64", "(609.7817230224609), \'EXPOSURE\': np.float64(596.6629532243182), \'TSYS\':", "np.float64(108.4373706262882), \'TDIM7\': \'(16384,1,1,1)\', \'TUNIT7\': \'K\',", "\'CTYPE1\': \'FREQ-OBS\', \'CRVAL1\': 87228489084.0, \'CRPIX1\': 8193.0, \'CDELT1", "\': 91552.734375, \'CTYPE2\': \'RA\', \'CRVAL2\': np.float64(148.93912271827946", "), \'CTYPE3\': \'DEC\', \'CRVAL3\': np.float64(69.6332217677112), \'CRVAL4\': 1,", " \'OBSERVER\': \'Dom Pesce\', \'OBSID\': \'unknown\', \'SCAN\': 131, \'OBSMODE\': \'N", "od:NONE:TPNOCAL\', \'FRONTEND\': \'Rcvr68_92\', \'TCAL\': np.float64(1.0), \'VEL", "DEF\': \'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\': 872300", "00000.0, \'DOPFREQ\': 86400000000.0, \'FREQRES\': 91552.734375, \'EQUINOX\': 2", "000.0, \'RADESYS\': \'FK5\', \'TRGTLONG\': 148.9695833333333, \'TRGTLAT\': 69.67", "944444444444, \'SAMPLER\': \'B1_0\', \'FEED\': 1, \'SRFEED\': 0, \'FEEDXOFF\': 0.0", ", \'FEEDEOFF\': 0.0, \'SUBREF_STATE\': 1, \'SIDEBAND\': \'U\', \'PROCSEQN\': 1, \'P", "ROCSIZE\': 2, \'PROCSCAN\': \'BEAM1\', \'PROCTYPE\': \'SIMPLE\', \'LASTON\': 0, \'LA", "STOFF\': 0, \'TIMESTAMP\': \'2017_02_04_10:11:43\', \'QD_XEL\': -0.001725754837", "0722825, \'QD_EL\': 0.001033652915095047, \'QD_BAD\': 0, \'QD_METHOD\': \'A\', \'", "VELOCITY\': 0.0, \'FOFFREF1\': 0.0, \'ZEROCHAN\': nan, \'ADCSAMPF\': 3000000000", ".0, \'VSPDELT\': 512.0, \'VSPRVAL\': 16.0, \'VSPRPIX\': 8192.0, \'SIG\': \'T\', \'C", "AL\': \'F\', \'CALTYPE\': \'LOW\', \'TWARM\': 263.18359375, \'TCOLD\': 18.5546875,", "\'CALPOSITION\': \'Observing\', \'BACKEND\': \'VEGAS\', \'PROJID\': \'AGBT15B_244_0", "7\', \'TELESCOP\': \'NRAO_GBT\', \'SITELONG\': -79.83983, \'SITELAT\': 38.43312,", "\'SITEELEV\': 824.595, \'IFNUM\': 1, \'PLNUM\': 1, \'FDNUM\': 0, \'INT\': 0, \'NSAV", "E\': -1, \'HDU\': 1, \'BINTABLE\': 0, \'ROW\': 54, \'SIMPLE\': True, \'EXTEND\': Tr", "ue, \'DATE\': \'2025-05-27\', \'ORIGIN\': \'NRAO Green Bank\', \'GUIDEVER\': \'GBTI", "DL ver2.10.1\', \'FITSVER\': \'1.9\', \'EXTNAME\': \'SINGLE DISH\', \'CTYPE4\': \'ST", "OKES\', \'FITSINDEX\': 0, \'PROC\': \'Nod\', \'OBSTYPE\': \'NONE\', \'SUBOBSMODE\': \'", "TPNOCAL\', \'CUNIT1\': \'Hz\', \'CUNIT2\': \'deg\', \'CUNIT3\': \'deg\', \'RESTFRQ\': n", "p.float64(87230000000.0), \'BUNIT\': \'K\', \'TSCALE\': \'Ta*\', \'NAXIS1\': 16384", ", \'TSCALFAC\': np.float64(3.132414901397774), \'AP_EFF\': np.float64(0.3501", "0735602106374), \'SURF_ERR\': np.float64(230.0), \'SE_UNIT\': \'micron\', \'MEA", "NTSYS\': np.float64(137.12980829151758), \'WTTSYS\': np.float64(137.1298082", "9151758), \'TAU_Z\': np.float64(0.059907041200000004)},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.0,\', \'0.0) km): (x, y, z) in m     (882593.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)     (1\', \'48.93912272, 69.63322177, 1000000.)  (pm_ra_cosdec, pm_dec, radial_veloc\', \'ity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>,mask=[ True False\', \' False ... False False False],)\', \'2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.\', \'average(Spectrum (length=16384) Flux=[        nan -0.06004197 -0.1851106\', \'9 ...  0.30823558  0.26746191       -0.84623934] K,  mean=0.00415 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.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.93912272, 69.63322177, 1000000.)  (pm_ra_cosdec, pm_dec, radial_velocity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>,)',
 '2026-03-16T23:04:53+0000 - DYSH v1.0.1 : 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(output_dir / "M82_ifnum_1_polavg.fits")
hdu
[<astropy.io.fits.hdu.image.PrimaryHDU object at 0x74e6498b3be0>, <astropy.io.fits.hdu.table.BinTableHDU object at 0x74e64858eaa0>]

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=    609.7817230224609                                                  
EXPOSURE=    596.6629532243182                                                  
TSYS    =    108.4373706262882                                                  
CTYPE1  = 'FREQ-OBS'                                                            
CRVAL1  =        87228489084.0                                                  
CRPIX1  =               8193.0                                                  
CDELT1  =         91552.734375                                                  
CTYPE2  = 'RA      '                                                            
CRVAL2  =   148.93912271827946                                                  
CTYPE3  = 'DEC     '                                                            
CRVAL3  =     69.6332217677112                                                  
CRVAL4  =                    1                                                  
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.132414901397774                                                  
AP_EFF  =  0.35010735602106374                                                  
SURF_ERR=                230.0                                                  
SE_UNIT = 'micron  '                                                            
MEANTSYS=   137.12980829151758                                                  
WTTSYS  =   137.12980829151758                                                  
TAU_Z   = 0.059907041200000004                                                  
HISTORY 2026-03-16T23:03:58 - Project ID: AGBT15B_244_07                        
HISTORY 2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.__init__(AGBT15B_244_07.raw.vegas.trim.fits,)                        
HISTORY 2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.apply_flags()                                                        
HISTORY 2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.flag_vegas_spurs()                                                   
HISTORY 2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.__i
HISTORY nit__()                                                                 
HISTORY 2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
HISTORY ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[np.floa
HISTORY t64(108.22387107748688)], [np.float64(143.54009942913794)]],zenith_opaci
HISTORY ty=0.0599070412,units=Ta*,)                                             
HISTORY 2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.tim
HISTORY eaverage()                                                              
HISTORY 2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
HISTORY __init__(flux=[         -0.07918082 -0.01101417 ...  0.28614683  0.29800
HISTORY 966   0.64951734] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : 'FRE
HISTORY Q' 'RA' 'DEC' 'STOKES'  CRVAL : np.float64(87228489084.0) np.float64(148
HISTORY .94971752154765) np.float64(69.64973941003959) np.float64(-6.0)  CRPIX :
HISTORY  np.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1
HISTORY _1 PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0) 
HISTORY np.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1
HISTORY .0) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float
HISTORY 64(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4
HISTORY _3 PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1
HISTORY .0)  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np
HISTORY .float64(1.0)  NAXIS : 16384  0  0  0,meta={'OBJECT': 'M82', 'BANDWID': 
HISTORY 1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.00', 'DURATION': np.float
HISTORY 64(304.89086151123047), 'EXPOSURE': np.float64(298.3314766121591), 'TSYS
HISTORY ': np.float64(121.02359518771574), 'TDIM7': '(16384,1,1,1)', 'TUNIT7': '
HISTORY K', 'CTYPE1': 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CD
HISTORY ELT1': 91552.734375, 'CTYPE2': 'RA', 'CRVAL2': np.float64(148.9497175215
HISTORY 4765), 'CTYPE3': 'DEC', 'CRVAL3': np.float64(69.64973941003959), 'CRVAL4
HISTORY ': -6, 'OBSERVER': 'Dom Pesce', 'OBSID': 'unknown', 'SCAN': 131, 'OBSMOD
HISTORY E': 'Nod:NONE:TPNOCAL', 'FRONTEND': 'Rcvr68_92', 'TCAL': np.float64(1.0)
HISTORY , 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043649, 'RVSYS': 0.0, 'OBSF
HISTORY REQ': 87228489084.0, 'LST': 49886.57916905915, 'AZIMUTH': 334.4132429832
HISTORY 569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT': 261.45001220703125, 'PR
HISTORY ESSURE': 699.2300046755845, 'HUMIDITY': 0.6909999847412109, 'RESTFREQ': 
HISTORY 87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRES': 91552.734375, 'EQUIN
HISTORY OX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9695833333333, 'TRGTLAT':
HISTORY  69.67944444444444, 'SAMPLER': 'B2_0', 'FEED': 1, 'SRFEED': 0, 'FEEDXOFF
HISTORY ': 0.0, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SIDEBAND': 'U', 'PROCSEQN':
HISTORY  1, 'PROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYPE': 'SIMPLE', 'LASTON': 
HISTORY 0, 'LASTOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:43', 'QD_XEL': -0.001725
HISTORY 7548370722825, 'QD_EL': 0.001033652915095047, 'QD_BAD': 0, 'QD_METHOD': 
HISTORY 'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ZEROCHAN': nan, 'ADCSAMPF': 3000
HISTORY 000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, 'SIG': '
HISTORY T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD': 18.554
HISTORY 6875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': 'AGBT15B
HISTORY _244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT': 38.4
HISTORY 3312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 0, 'FDNUM': 0, 'INT': 0,
HISTORY  'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 52, 'SIMPLE': True, 'EXTEN
HISTORY D': True, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUIDEVER':
HISTORY  'GBTIDL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH', 'CTYPE4
HISTORY ': 'STOKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'SUBOBSMO
HISTORY DE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg', 'RESTF
HISTORY RQ': np.float64(87230000000.0), 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1':
HISTORY  16384, 'TSCALFAC': np.float64(3.132414901397774), 'AP_EFF': np.float64(
HISTORY 0.35010735602106374), 'SURF_ERR': np.float64(229.99999999999994), 'SE_UN
HISTORY IT': 'micron', 'MEANTSYS': np.float64(108.22387107748688), 'WTTSYS': np.
HISTORY float64(108.22387107748688), 'TAU_Z': np.float64(0.05990704119999998)},v
HISTORY elocity_convention=optical,radial_velocity=0.0 km / s,rest_value=8723000
HISTORY 0000.0 Hz,observer=<ITRS Coordinate (obstime=2017-02-04T10:11:43.000, lo
HISTORY cation=(0.0, 0.0, 0.0) km): (x, y, z) in m     (882593.9465029, -4924896
HISTORY .36541728, 3943748.74743984)  (v_x, v_y, v_z) in km / s     (0., 0., 0.)
HISTORY >,target=<SkyCoord (FK5: equinox=J2000.000): (ra, dec, distance) in (deg
HISTORY , deg, kpc)     (148.94971752, 69.64973941, 1000000.)  (pm_ra_cosdec, pm
HISTORY _dec, radial_velocity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>
HISTORY ,mask=[ True False False ... False False False],)                       
HISTORY 2026-03-16T23:04:49+0000 - DYSH v1.0.1 : 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 2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
HISTORY __init__(flux=[         -0.38167784 -0.42788408 ...  0.29981571  0.28108
HISTORY 434  -0.23835116] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : 'FRE
HISTORY Q' 'RA' 'DEC' 'STOKES'  CRVAL : np.float64(87228489084.0) np.float64(148
HISTORY .93912271827946) np.float64(69.6332217677112) np.float64(1.0)  CRPIX : n
HISTORY p.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1_1
HISTORY  PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0) np
HISTORY .float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1.0
HISTORY ) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float64
HISTORY (0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4_3
HISTORY  PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1.0
HISTORY )  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np.f
HISTORY loat64(1.0)  NAXIS : 16384  0  0  0,meta={'OBJECT': 'M82', 'BANDWID': 15
HISTORY 00000000.0, 'DATE-OBS': '2017-02-04T10:11:43.00', 'DURATION': np.float64
HISTORY (609.7817230224609), 'EXPOSURE': np.float64(596.6629532243182), 'TSYS': 
HISTORY np.float64(108.4373706262882), 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K', 
HISTORY 'CTYPE1': 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1
HISTORY ': 91552.734375, 'CTYPE2': 'RA', 'CRVAL2': np.float64(148.93912271827946
HISTORY ), 'CTYPE3': 'DEC', 'CRVAL3': np.float64(69.6332217677112), 'CRVAL4': 1,
HISTORY  'OBSERVER': 'Dom Pesce', 'OBSID': 'unknown', 'SCAN': 131, 'OBSMODE': 'N
HISTORY od:NONE:TPNOCAL', 'FRONTEND': 'Rcvr68_92', 'TCAL': np.float64(1.0), 'VEL
HISTORY DEF': 'OPTI-BAR', 'VFRAME': 5241.161782043649, 'RVSYS': 0.0, 'OBSFREQ': 
HISTORY 87228489084.0, 'LST': 49886.57916905915, 'AZIMUTH': 334.4132429832569, '
HISTORY ELEVATIO': 46.497692750558066, 'TAMBIENT': 261.45001220703125, 'PRESSURE
HISTORY ': 699.2300046755845, 'HUMIDITY': 0.6909999847412109, 'RESTFREQ': 872300
HISTORY 00000.0, 'DOPFREQ': 86400000000.0, 'FREQRES': 91552.734375, 'EQUINOX': 2
HISTORY 000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9695833333333, 'TRGTLAT': 69.67
HISTORY 944444444444, 'SAMPLER': 'B1_0', 'FEED': 1, 'SRFEED': 0, 'FEEDXOFF': 0.0
HISTORY , 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SIDEBAND': 'U', 'PROCSEQN': 1, 'P
HISTORY ROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYPE': 'SIMPLE', 'LASTON': 0, 'LA
HISTORY STOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:43', 'QD_XEL': -0.001725754837
HISTORY 0722825, 'QD_EL': 0.001033652915095047, 'QD_BAD': 0, 'QD_METHOD': 'A', '
HISTORY VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ZEROCHAN': nan, 'ADCSAMPF': 3000000000
HISTORY .0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, 'SIG': 'T', 'C
HISTORY AL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD': 18.5546875, 
HISTORY 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': 'AGBT15B_244_0
HISTORY 7', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT': 38.43312, 
HISTORY 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 1, 'FDNUM': 0, 'INT': 0, 'NSAV
HISTORY E': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 54, 'SIMPLE': True, 'EXTEND': Tr
HISTORY ue, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUIDEVER': 'GBTI
HISTORY DL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH', 'CTYPE4': 'ST
HISTORY OKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'SUBOBSMODE': '
HISTORY TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg', 'RESTFRQ': n
HISTORY p.float64(87230000000.0), 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 16384
HISTORY , 'TSCALFAC': np.float64(3.132414901397774), 'AP_EFF': np.float64(0.3501
HISTORY 0735602106374), 'SURF_ERR': np.float64(230.0), 'SE_UNIT': 'micron', 'MEA
HISTORY NTSYS': np.float64(137.12980829151758), 'WTTSYS': np.float64(137.1298082
HISTORY 9151758), 'TAU_Z': np.float64(0.059907041200000004)},velocity_convention
HISTORY =optical,radial_velocity=0.0 km / s,rest_value=87230000000.0 Hz,observer
HISTORY =<ITRS Coordinate (obstime=2017-02-04T10:11:43.000, location=(0.0, 0.0, 
HISTORY 0.0) km): (x, y, z) in m     (882593.9465029, -4924896.36541728, 3943748
HISTORY .74743984)  (v_x, v_y, v_z) in km / s     (0., 0., 0.)>,target=<SkyCoord
HISTORY  (FK5: equinox=J2000.000): (ra, dec, distance) in (deg, deg, kpc)     (1
HISTORY 48.93912272, 69.63322177, 1000000.)  (pm_ra_cosdec, pm_dec, radial_veloc
HISTORY ity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>,mask=[ True False
HISTORY  False ... False False False],)                                         
HISTORY 2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
HISTORY average(Spectrum (length=16384) Flux=[        nan -0.06004197 -0.1851106
HISTORY 9 ...  0.30823558  0.26746191       -0.84623934] K,  mean=0.00415 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"]
2026-03-16T23:03:58 - Project ID: AGBT15B_244_07
2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.__init__(AGBT15B_244_07.raw.vegas.trim.fits,)
2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:03:58+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:03:59+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:00+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:01+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:02+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:03+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:04+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:05+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:06+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:07+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:08+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:09+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:10+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:11+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:12+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:13+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:14+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:15+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:16+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:17+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:18+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:19+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:20+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:22+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:23+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:25+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:26+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:28+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:36+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.apply_flags()
2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.flag_vegas_spurs()
2026-03-16T23:04:38+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.__i
nit__()
2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.fits.gbtfitsload.GBTFITSLo
ad.getnod(scan=[131, 133, 135, 137, 139],ifnum=1,plnum=0,t_sys=[[np.floa
t64(108.22387107748688)], [np.float64(143.54009942913794)]],zenith_opaci
ty=0.0599070412,units=Ta*,)
2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.scan.ScanBlock.tim
eaverage()
2026-03-16T23:04:39+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
__init__(flux=[         -0.07918082 -0.01101417 ...  0.28614683  0.29800
966   0.64951734] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : 'FRE
Q' 'RA' 'DEC' 'STOKES'  CRVAL : np.float64(87228489084.0) np.float64(148
.94971752154765) np.float64(69.64973941003959) np.float64(-6.0)  CRPIX :
 np.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1
_1 PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0)
np.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1
.0) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float
64(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4
_3 PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1
.0)  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np
.float64(1.0)  NAXIS : 16384  0  0  0,meta={'OBJECT': 'M82', 'BANDWID':
1500000000.0, 'DATE-OBS': '2017-02-04T10:11:43.00', 'DURATION': np.float
64(304.89086151123047), 'EXPOSURE': np.float64(298.3314766121591), 'TSYS
': np.float64(121.02359518771574), 'TDIM7': '(16384,1,1,1)', 'TUNIT7': '
K', 'CTYPE1': 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CD
ELT1': 91552.734375, 'CTYPE2': 'RA', 'CRVAL2': np.float64(148.9497175215
4765), 'CTYPE3': 'DEC', 'CRVAL3': np.float64(69.64973941003959), 'CRVAL4
': -6, 'OBSERVER': 'Dom Pesce', 'OBSID': 'unknown', 'SCAN': 131, 'OBSMOD
E': 'Nod:NONE:TPNOCAL', 'FRONTEND': 'Rcvr68_92', 'TCAL': np.float64(1.0)
, 'VELDEF': 'OPTI-BAR', 'VFRAME': 5241.161782043649, 'RVSYS': 0.0, 'OBSF
REQ': 87228489084.0, 'LST': 49886.57916905915, 'AZIMUTH': 334.4132429832
569, 'ELEVATIO': 46.497692750558066, 'TAMBIENT': 261.45001220703125, 'PR
ESSURE': 699.2300046755845, 'HUMIDITY': 0.6909999847412109, 'RESTFREQ':
87230000000.0, 'DOPFREQ': 86400000000.0, 'FREQRES': 91552.734375, 'EQUIN
OX': 2000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9695833333333, 'TRGTLAT':
 69.67944444444444, 'SAMPLER': 'B2_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.001725
7548370722825, 'QD_EL': 0.001033652915095047, 'QD_BAD': 0, 'QD_METHOD':
'A', 'VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ZEROCHAN': nan, 'ADCSAMPF': 3000
000000.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, 'SIG': '
T', 'CAL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD': 18.554
6875, 'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': 'AGBT15B
_244_07', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT': 38.4
3312, 'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 0, 'FDNUM': 0, 'INT': 0,
 'NSAVE': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 52, 'SIMPLE': True, 'EXTEN
D': 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', 'SUBOBSMO
DE': 'TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg', 'RESTF
RQ': np.float64(87230000000.0), 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1':
 16384, 'TSCALFAC': np.float64(3.132414901397774), 'AP_EFF': np.float64(
0.35010735602106374), 'SURF_ERR': np.float64(229.99999999999994), 'SE_UN
IT': 'micron', 'MEANTSYS': np.float64(108.22387107748688), 'WTTSYS': np.
float64(108.22387107748688), 'TAU_Z': np.float64(0.05990704119999998)},v
elocity_convention=optical,radial_velocity=0.0 km / s,rest_value=8723000
0000.0 Hz,observer=<ITRS Coordinate (obstime=2017-02-04T10:11:43.000, lo
cation=(0.0, 0.0, 0.0) km): (x, y, z) in m     (882593.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.94971752, 69.64973941, 1000000.)  (pm_ra_cosdec, pm
_dec, radial_velocity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>
,mask=[ True False False ... False False False],)
2026-03-16T23:04:49+0000 - DYSH v1.0.1 : 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,)
2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
__init__(flux=[         -0.38167784 -0.42788408 ...  0.29981571  0.28108
434  -0.23835116] K,wcs=WCS Keywords  Number of WCS axes: 4 CTYPE : 'FRE
Q' 'RA' 'DEC' 'STOKES'  CRVAL : np.float64(87228489084.0) np.float64(148
.93912271827946) np.float64(69.6332217677112) np.float64(1.0)  CRPIX : n
p.float64(8193.0) np.float64(0.0) np.float64(0.0) np.float64(0.0)  PC1_1
 PC1_2 PC1_3 PC1_4  : np.float64(1.0) np.float64(0.0) np.float64(0.0) np
.float64(0.0)  PC2_1 PC2_2 PC2_3 PC2_4  : np.float64(0.0) np.float64(1.0
) np.float64(0.0) np.float64(0.0)  PC3_1 PC3_2 PC3_3 PC3_4  : np.float64
(0.0) np.float64(0.0) np.float64(1.0) np.float64(0.0)  PC4_1 PC4_2 PC4_3
 PC4_4  : np.float64(0.0) np.float64(0.0) np.float64(0.0) np.float64(1.0
)  CDELT : np.float64(91552.734375) np.float64(1.0) np.float64(1.0) np.f
loat64(1.0)  NAXIS : 16384  0  0  0,meta={'OBJECT': 'M82', 'BANDWID': 15
00000000.0, 'DATE-OBS': '2017-02-04T10:11:43.00', 'DURATION': np.float64
(609.7817230224609), 'EXPOSURE': np.float64(596.6629532243182), 'TSYS':
np.float64(108.4373706262882), 'TDIM7': '(16384,1,1,1)', 'TUNIT7': 'K',
'CTYPE1': 'FREQ-OBS', 'CRVAL1': 87228489084.0, 'CRPIX1': 8193.0, 'CDELT1
': 91552.734375, 'CTYPE2': 'RA', 'CRVAL2': np.float64(148.93912271827946
), 'CTYPE3': 'DEC', 'CRVAL3': np.float64(69.6332217677112), 'CRVAL4': 1,
 'OBSERVER': 'Dom Pesce', 'OBSID': 'unknown', 'SCAN': 131, 'OBSMODE': 'N
od:NONE:TPNOCAL', 'FRONTEND': 'Rcvr68_92', 'TCAL': np.float64(1.0), 'VEL
DEF': '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': 872300
00000.0, 'DOPFREQ': 86400000000.0, 'FREQRES': 91552.734375, 'EQUINOX': 2
000.0, 'RADESYS': 'FK5', 'TRGTLONG': 148.9695833333333, 'TRGTLAT': 69.67
944444444444, 'SAMPLER': 'B1_0', 'FEED': 1, 'SRFEED': 0, 'FEEDXOFF': 0.0
, 'FEEDEOFF': 0.0, 'SUBREF_STATE': 1, 'SIDEBAND': 'U', 'PROCSEQN': 1, 'P
ROCSIZE': 2, 'PROCSCAN': 'BEAM1', 'PROCTYPE': 'SIMPLE', 'LASTON': 0, 'LA
STOFF': 0, 'TIMESTAMP': '2017_02_04_10:11:43', 'QD_XEL': -0.001725754837
0722825, 'QD_EL': 0.001033652915095047, 'QD_BAD': 0, 'QD_METHOD': 'A', '
VELOCITY': 0.0, 'FOFFREF1': 0.0, 'ZEROCHAN': nan, 'ADCSAMPF': 3000000000
.0, 'VSPDELT': 512.0, 'VSPRVAL': 16.0, 'VSPRPIX': 8192.0, 'SIG': 'T', 'C
AL': 'F', 'CALTYPE': 'LOW', 'TWARM': 263.18359375, 'TCOLD': 18.5546875,
'CALPOSITION': 'Observing', 'BACKEND': 'VEGAS', 'PROJID': 'AGBT15B_244_0
7', 'TELESCOP': 'NRAO_GBT', 'SITELONG': -79.83983, 'SITELAT': 38.43312,
'SITEELEV': 824.595, 'IFNUM': 1, 'PLNUM': 1, 'FDNUM': 0, 'INT': 0, 'NSAV
E': -1, 'HDU': 1, 'BINTABLE': 0, 'ROW': 54, 'SIMPLE': True, 'EXTEND': Tr
ue, 'DATE': '2025-05-27', 'ORIGIN': 'NRAO Green Bank', 'GUIDEVER': 'GBTI
DL ver2.10.1', 'FITSVER': '1.9', 'EXTNAME': 'SINGLE DISH', 'CTYPE4': 'ST
OKES', 'FITSINDEX': 0, 'PROC': 'Nod', 'OBSTYPE': 'NONE', 'SUBOBSMODE': '
TPNOCAL', 'CUNIT1': 'Hz', 'CUNIT2': 'deg', 'CUNIT3': 'deg', 'RESTFRQ': n
p.float64(87230000000.0), 'BUNIT': 'K', 'TSCALE': 'Ta*', 'NAXIS1': 16384
, 'TSCALFAC': np.float64(3.132414901397774), 'AP_EFF': np.float64(0.3501
0735602106374), 'SURF_ERR': np.float64(230.0), 'SE_UNIT': 'micron', 'MEA
NTSYS': np.float64(137.12980829151758), 'WTTSYS': np.float64(137.1298082
9151758), 'TAU_Z': np.float64(0.059907041200000004)},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.0,
0.0) km): (x, y, z) in m     (882593.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)     (1
48.93912272, 69.63322177, 1000000.)  (pm_ra_cosdec, pm_dec, radial_veloc
ity) in (mas / yr, mas / yr, km / s)     (0., 0., 0.)>,mask=[ True False
 False ... False False False],)
2026-03-16T23:04:51+0000 - DYSH v1.0.1 : dysh.spectra.spectrum.Spectrum.
average(Spectrum (length=16384) Flux=[        nan -0.06004197 -0.1851106
9 ...  0.30823558  0.26746191       -0.84623934] K,  mean=0.00415 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)")
plt.show()
/home/docs/checkouts/readthedocs.org/user_builds/dysh/envs/release-1.0.0/lib/python3.10/site-packages/traitlets/traitlets.py:1385: DeprecationWarning: Passing unrecognized arguments to super(Toolbar).__init__().
NavigationToolbar2WebAgg.__init__() missing 1 required positional argument: 'canvas'
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
  warn(

Final Stats#

Finally, at the end we compute some statistics over a spectrum, merely as a checksum if the notebook is reproducible.

read_spec_smo.check_stats(0.04375961 * u.K)
23:04:53.622 I Note: found 92 NaN (masked) values
23:04:53.622 I rms is OK 
# radiometer on one pre-Ta* corrected window
nod_ta[0,0][2000:7000].radiometer(roll=1)  # 1.0398
23:04:53.840 I Note: found 20 NaN (masked) values
np.float64(1.0398178385707268)