Home > Angelas_Raster_Code > pol_cal_sources.m

pol_cal_sources

PURPOSE ^

SYNOPSIS ^

function pol_cal_sources(save_path)

DESCRIPTION ^

  e.g. pol_cal_sources('n_raster_test')
  save_path is where the dgood data and caldata is stored (where you
  stored it in run_lots_of_rasters)

%
 data_files are the list of rasters that you want to calibrate.
  you need to have run 'run_lots_of_rasters' on them first so that you have the data in tehe correct format for calibration
  it spits out the _dgood.mat files as part of this
  m42 data example

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pol_cal_sources(save_path)
0002 %
0003 %  e.g. pol_cal_sources('n_raster_test')
0004 %  save_path is where the dgood data and caldata is stored (where you
0005 %  stored it in run_lots_of_rasters)
0006 %
0007 %%
0008 % data_files are the list of rasters that you want to calibrate.
0009 %  you need to have run 'run_lots_of_rasters' on them first so that you have the data in tehe correct format for calibration
0010 %  it spits out the _dgood.mat files as part of this
0011 %  m42 data example
0012 data_files = {...;
0013 '13-Nov-2012:06:46:02_m42_dgood.mat';...
0014 '26-Apr-2013:18:24:08_m42_dgood.mat';...
0015 '28-Apr-2013:18:16:18_m42_dgood.mat';...
0016 '11-Jun-2013:17:14:41_m42_dgood.mat';...
0017 '28-Jun-2013:20:11:04_m42_dgood.mat';...
0018 '16-Jul-2013:13:48:20_m42_dgood.mat'};
0019 
0020 %% Cal files are teh calibration matrices you want to use
0021 % Again these are generated when you run run_lots_of_rasters on a taua
0022 % observation
0023 cal_files = {'07-Nov-2012:07:22:02_taua_caldata.mat';... 
0024 '12-Dec-2012:03:05:38_taua_caldata.mat';...
0025 '13-Dec-2012:05:50:12_taua_caldata.mat';...
0026 '25-Mar-2013:22:55:18_taua_caldata.mat';...
0027 '24-Apr-2013:20:32:44_taua_caldata.mat';...
0028 '25-Apr-2013:18:28:08_taua_caldata.mat';...
0029 '27-Apr-2013:18:20:14_taua_caldata.mat';...
0030 '29-Apr-2013:18:12:25_taua_caldata.mat';...
0031 '26-Jun-2013:18:30:24_taua_caldata.mat';...
0032 '29-Jun-2013:16:57:15_taua_caldata.mat';...
0033 '17-Jul-2013:13:53:34_taua_caldata.mat';...
0034 '16-Jul-2013:13:48:20_m42_caldata.mat'}; % Calibrate TauA on M42
0035 
0036 
0037 % Match data to be calibrated with closest TauA cal file - need to
0038 % automate(!)
0039 
0040 cal_selection=[1,6,7,8,10,11] % To match selection of m42 above ie. m42 observation 1 uses tau a calibration 1 etc
0041 
0042 %%
0043 %Just want to calibrate other sources from TauA calmat
0044 %save_path = 'test_fits_June2013'
0045 [home,installeddir] = where_am_i();
0046 maindir= [home,'/',installeddir,'/',save_path,'/'];
0047 
0048 %filename = ([maindir,start_date,'_',source_name]);
0049 %source_name = 'TauA'
0050 
0051 
0052 %for i=1:length(data_files)
0053     for i=4 % just do CygA, 26June2013
0054     temp = regexp(data_files(i),'_','split');
0055     start_date = char(temp{1}(1,1))
0056     source_name = char(temp{1}(1,2)) 
0057     
0058 
0059 %Load in the relevant caldata, calibrate and map
0060     temp_cal_file = char(cal_files(cal_selection(i)))
0061     load([maindir,temp_cal_file]);
0062     TauARaster_quick(save_path,source_name,start_date,calmat);
0063 end
0064 
0065 
0066

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005