NRAO Home  >  Green Bank  |  Wiki Topic:    GB > Software > PlanOfRecordC82005 > ModificationRequest16C705
   Changes | Index | Contents | Search | Statistics | Go

Add Support for CCB to GFM

Modification Request #16 (C7 2005)



1. Introduction

Since GFM is the real-time display tool for continuum data and the CCB is a new continuum backend, GFM must be updated to include data processing capabilities for the CCB.

2. Background

The CCB is a continuum backend that can only be used with the Ka receiver. Unlike other GBT backends, the CCB is hard-wired to the Ka receiver. However in relation to other GBT backends, it is most similar to the DCR. The CCB does differ from the DCR in one key area - the firing of the cals (on/off) is handled per integration rather than within an integration. Therefore, the cal will either be present or absent for the entirety of each integration.

The FITS specification for the CCB is available at http://www.gb.nrao.edu/GBT/MC/doc/dataproc/gbtCCBFits/gbtCCBFits/gbtCCBFits.html.

The GBT FITS Monitor (GFM) provides sub-scan-based display and analysis of GBT data, either in real-time as the continuum data is being collected, or in an offline mode where it can be used to simply step through the sub-scans from an observation for continuum observations.

This MR should be implemented while keeping in mind (but not necessarily implementing) the data reduction vision that Frank created for all data reduction programs.

3. Requirements

GFM CCB support is meant to work both online and offline, within astrid, and within the stand-alone gfm application. I break the needed functionality down by plugin-- pointing/focus, and "dcr" (continuum). tipping plugin not presently specified. No calibration is presently specified-- it's all a form of Raw mode.

3.1 Specifications for Pointing and Focus Plugins

At present I specify only a raw mode for CCB processing. The goal is to form a quantity "y" which is used in GFM processing-- it is the "data" quantity that you are fitting to (ultimately the y axis of your GFM plot display, proportional to Antenna Temperature). The goal is to be able to use GFM online as well as offline to derive pointing and focus data with the GBT (thus, the requirements below must be implement at least for the pointing and focus plugin; it would be nice if the DCR plugin also displayed the data).

Further comment on the integration dropping... since you have potentially dropped samples from the y-axis (data) you should be careful in a) inferring the correct x-axis (time or antenna position offset) values; and b) fitting. I doubt that either of these assumes regularly spaced data in either axis but beware. A sensible way to do this is to first associate times and antenna positions with the full set of CCB data and then drop the CCB data samples that you don't want due to the reasons listed above (a cal diode was on, or the integration was not stable, or one or more phases of the integration were overflowed).

Don't forget to look up the correct (L1C etc) Tcal values. Except: we aren't using Tcals at this point so forget about it!

3.2 Requirements for "DCR Plugin"

Assume that the DCR plugin is becoming a "generic continuum plugin". It should display CCB data.

4. Design

4.1 Overview

The inclusion of the CCB into GFM's data reduction capabilities is a good catalyst for the implementation of the continuum portion of the SDFITS redesign. This is because GFM and SDFITS use the same APIs to perform data reduction. Since we already have a SDFITS redesign vision, the major software architecture questions have already been answered for how to include the CCB. They just need to be implemented. smile Don't be fooled though, there is a lot of work to be done - read on...

The outline of what the new backend classes will look like is shown in the backend overview graphic and then refined in backend details graphic. Additional helper classes can be found in the helper classes graphic. The existing DCR classes will have to be refactored to conform to the new design while maintaining backward compatibility; this effort will be helped by the unit tests for the existing DCR classes. The new CCB classes will essentially mirror the refactored DCR classes. No refactoring will be performed on the spectral line backend classes.

4.2 New Base Classes

Changes to the gbt/api directory in sparrow will include a new directory called "backend". This directory will house the base classes Backend, ContinuumBackend, SpectralLineBackend (will not be implemented for this MR), BackendData, Phase, Input, ContinuumInput, and SpectralLineInput (will not be implemented for this MR).

Code common to both the DCR and CCB will be bubbled up from the various DCR classes to the appropriate base classes (ContinuumBackend, ContinuumInput, and possibly BackendData and Phase. Backend, SpectralLineInput, and Input will be skeleton base classes until the refactoring effort is extended to include spectral line backends.

4.3 Revising the DCR API

There are lots of files in the DCR API that don't have to be DCR specific. In fact, they should be generalized to use any available continuum backend. These files are: AzimuthScan.py, ElevationScan.py, FitDualGaussian.py, FitDualGaussianWithBase.py, FitFWSingleGaussianWithBase.py, FitPolynomial.py, FitPolynomialTests.py, FitSingleGaussian.py, FitSingleGaussianWithBase.py, FittingStrategy.py, FocusScan.py, OffsetScan.py, PointingScan.py, pointingTable.py. Any specific references to the DCR should be replaced with a call to a "backend", which will be of type ContinuumBackend. The fitting files should be placed in their own directory under sparrow/api called fitting. The C++ fitting library from DEAP will also be moved from DEAP to the new fitting directory. The *Scan files should be placed in a new directory under gbt/api called "scans". The file, Phase.py, should be placed in the new directory, "backend", mentioned in the previous section.

There are also files in the DCR API which can be removed because they are no longer used; these files are: Display.py, OffsetScanFactory.py, and TPoint.py.

There is one file that needs to be renamed. Input.py should be DcrInput.py.

4.4 CCB Specific

A new directory called "ccb" will be added to the gbt/api directory. This will be the home for 3 new classes: Ccb, CcbData, and CcbInput. These classes will be very similar to the corresponding DCR classes, but will contain the CCB specific data details spelled out in the requirements section above.

4.5 GFM

4.5.1 Pointing & Focus Plugin

These should be revised to point to the correct object (DCR or CCB) based upon which backend is present in the data. The CCB and the DCR will never be used at the same time due to physical restrictions. Other than that, the plugins should mostly use the generic stuff extracted to the backend API whose details are in the "Revising the DCR API" section above. So there are not many changes that have to happen here. Basically, anything DCR-specific should be generalized to any continuum backend. This is pretty much already done in the code, but DCR-specific variable names will have to change.

4.5.2 Generic DCR Plugin

This plugin needs to become the "Continuum" plugin and be able to handle both DCR and CCB data (and any other continuum backend for that matter). Again, this is pretty much set up to accept the new CCB classes but any DCR-specific references/variables should be generalized.

5. Deployment Checklist

6. Test Plan

6.1 Unit Testing

The existing DCR unit tests should still work after the refactoring of the code base. Unit tests for the new CCB code will be created.

6.2 System Testing

Project TKA_ccb10nov05 has a peak scan with the CCB. Use scans 8 - 11 (starting with file 2005_11_11_15:19:41) to verify that different selections of polarization and frequency yield sensible things-- in particular that the derived beamwidth scales as expected with changing frequency.

Pointing offsets derived should be close to zero on the assumption that DCR peak scans 3 - 6 immediately preceeding (which can also be used for comparison), effectively installed them.

Before the end of December, additional testable data will certainly be collected. Notes to self (self is bsm)-- here are the data you should remember to acquire:

The idea here is to emphasize the integration-dropping and bring out any problems that might exist.

6.3 Regression Testing

There are two sets of regression tests, specified at GbtFitsMonitorRegressionExamples and GbtFitsMonitorBenchmarks, which will be run to ensure that there is no change to DCR data reduction behavior and that GFM will still process those projects correctly.

Also, these changes will be part of the regular regression tests on the telescope before release.


Signatures

APPROVED: I acknowledge that my request is fully contained in this MR, and if the SDD delivers exactly what I specified, I will be happy.

ACCEPTED: I acknowledge that I have validated the completed code according to the acceptance tests, and I am happy with the results.

Written DONE - AmyShelton - 08 Dec 2005
Checked DONE - NicoleRadziwill - 08 Dec 2005
Approved by Sponsor DONE - BSM 10dec05
Approved by CCC DONE - RichardPrestage 19 Dec 2005
Accepted/Delivered by Sponsor DONE BSM 28mar06

Symbols:


CCC Discussion Area

Topic ModificationRequest16C705 . { Edit | Attach | Ref-By | Printable | Diffs | r1.18 | > | r1.17 | > | r1.16 | More }
Revision r1.18 - 28 Mar 2006 - 21:41 GMT - BrianMason
Parents: PlanOfRecordC82005
Content copyright © 1999-2007 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.