


Function Name:
cbass_write_data
author : Charles Copley charles.copley@astro.ox.ac.uk
date 15 June 2010
Comments updated to reflect change in c program 15-Apr-2014 (Paddy)
Description: Writes C-BASS data to an a FITS file for the map maker
Usage:
cbass_write_data(fits{i},[d.antenna0.receiver.utc-start_time_mjd ...
d.antenna0.servo.equa(:,1:2) ...
d.antenna0.servo.apparent(:,1:2) ...
d.antenna0.receiver.dataTcorr FLAG...
d.antenna0.servo.solarDist],0,0,...
start_time_mjd,end_time_mjd,i,numscans,...
start_time_batch_mjd,end_time_batch_mjd,DAYSCAN_BUFFER,
fits_header, no_fits_keywords)
Note that the column time data (i.e argument 2 first column) is given relative to the start_time_mjd. This is because of precision problems.
Arguments are as follows
fits{i} = filename (as a string)
data = [time-time(0) RA(rads) DEC(rads) Az(degs) Alt(degs) Data(6 columns)]
0(historical)
0(historical)
start_time_mjd(time is relative to this)- this is for this scan
end_time_mjd (end of the scan)
scan_number_batch - the position of this scan in the batch
number_of_scans_batch - total number of scans in the batch
start_time_batch-batch start time in MJD
end_time_batch - batch end time in MJD
DAYSCAN_BUFFER- number of minutes before sunrise and after sunset to flag
as daylight data
fits_header - 4 x no_fits_keywords cell array containing info for header
no_fits_keywords number of header lines in fits_header.
Arguments:
fits{i}- String character for the fits filename
Type 'mfitsio_license' to display the MFITSIO licensing agreement.

0001 % Function Name: 0002 % cbass_write_data 0003 % author : Charles Copley charles.copley@astro.ox.ac.uk 0004 % date 15 June 2010 0005 % 0006 % Comments updated to reflect change in c program 15-Apr-2014 (Paddy) 0007 % 0008 % Description: Writes C-BASS data to an a FITS file for the map maker 0009 % 0010 % Usage: 0011 % cbass_write_data(fits{i},[d.antenna0.receiver.utc-start_time_mjd ... 0012 % d.antenna0.servo.equa(:,1:2) ... 0013 % d.antenna0.servo.apparent(:,1:2) ... 0014 % d.antenna0.receiver.dataTcorr FLAG... 0015 % d.antenna0.servo.solarDist],0,0,... 0016 % start_time_mjd,end_time_mjd,i,numscans,... 0017 % start_time_batch_mjd,end_time_batch_mjd,DAYSCAN_BUFFER, 0018 % fits_header, no_fits_keywords) 0019 % 0020 % Note that the column time data (i.e argument 2 first column) is given relative to the start_time_mjd. This is because of precision problems. 0021 % Arguments are as follows 0022 % fits{i} = filename (as a string) 0023 % data = [time-time(0) RA(rads) DEC(rads) Az(degs) Alt(degs) Data(6 columns)] 0024 % 0(historical) 0025 % 0(historical) 0026 % start_time_mjd(time is relative to this)- this is for this scan 0027 % end_time_mjd (end of the scan) 0028 % scan_number_batch - the position of this scan in the batch 0029 % number_of_scans_batch - total number of scans in the batch 0030 % start_time_batch-batch start time in MJD 0031 % end_time_batch - batch end time in MJD 0032 % DAYSCAN_BUFFER- number of minutes before sunrise and after sunset to flag 0033 % as daylight data 0034 % fits_header - 4 x no_fits_keywords cell array containing info for header 0035 % no_fits_keywords number of header lines in fits_header. 0036 % 0037 % Arguments: 0038 % fits{i}- String character for the fits filename 0039 % 0040 % 0041 % 0042 % Type 'mfitsio_license' to display the MFITSIO licensing agreement. 0043 0044 function [IMAGE]=cbass_write_data(FILENAME); 0045 0046 % Author: Charles Copley