[daip] scaled peeling

Adam Deller deller at astron.nl
Thu Jun 27 03:21:01 EDT 2013


Hi Eric,

On Wed, Jun 26, 2013 at 11:52 PM, Eric Greisen <egreisen at nrao.edu> wrote:

> Adam Deller wrote:
>
>> Hi Eric,
>>
>> I have a data reduction problem that I thought you might be interested
>> in.  There is a faint pulsar target separated by 3" from a very bright
>> source.  The observation is VLBA plus phased EVLA, and the phased EVLA
>> synthesized beam is < 3".  So the bright source is in the primary beam for
>> the VLBA, and in the (messy) sidelobes for the EVLA.
>>
>> No problem - we'll just peel the bright source, right?  Only thing is, I
>> have a dataset where pulsar gating was using to boost S/N on the target.
>>  The flip side is, in this dataset, S/N is correspondingly reduced on the
>> bright source.  The correlator is blanked for 96% of the time due to the
>> gating, so the S/N change is a factor of 5.  So if I just run a peel on the
>> gated dataset, the S/N on the bright source is not good.
>>
>> However, I also have an ungated dataset (so full S/N on the bright
>> source, reduced S/N on the faint target).  So what I'd like to do is
>> *derive* the peeling corrections on the ungated dataset, but *apply* them
>> (and peel out the bright source) on the gated dataset.
>>
>> Since the difference between gated and ungated is simply a constant
>> amplitude scaling factor as far as the bright source is concerned, and I
>> know this factor because I know the width of the pulsar gate, this should
>> be easy enough in principle.  Take my model for the bright source, run a
>> peel on the ungated dataset, divide the flux in the bright source model by
>> 1/0.04 = 25, and run peel again on the gated dataset using this model *and
>> the solutions already derived from the ungated dataset*.  That last bit is
>> the bit that is missing, I think.  Is there an easy way to provide PEEL
>> with precooked solution tables?  Or if not, might it be easy to make this
>> an option?
>>
>
> Peeling in AIPS is done with a procedure which could easily be modified.
>
> However, what it does is find the self-cal for the peeled source and then
> restore that source to the data set.  I gather you just want it gone.
>
> I do not understand the "scaling".  The source in X Jy independent of
> whether it is observed 1 msec out of 100 or 100 msec out of 100.
>
>
Yes, this is a bit of a sore point.  When doing pulsar binning it would
indeed make more sense to have the amplitude scale in the way you suggest.
However, it is also possible to weight and sum multiple pulsar bins to get
optimum S/N for a pulsar with a complicated profile.  At that point, the
concept of the amplitude scale gets a bit wriggly, because of the
weighting.  Anyway, long story short, a decision was made that effectively
scales down the amplitude of pulsar-binned DiFX data by a factor equal to
the reciprocal of the bin duty cycle.  It is easy enough to fix - in this
case, I would just have to scale the gated dataset by a factor of 25, and
everything would back in the units you expect.


> The PEELER script takes an image as input and that could certainly come
> from the full time data set.  If you did it by hand, then one could put
> together something that also used an SN table developed from the one data
> set but used in the other.
>
> I attach the PEELER script which is where we would start...  Take a look.
>

Ahah - CLINV! That was the missing piece of the puzzle for me.  I didn't
know there was a task to invert a CL table.  Perfect.  OK, based on that
script I am pretty sure I can put together what I need.  Scale the gated
dataset x25, CALIB on the ungated dataset, copy the SN table to the gated
dataset, SPLAT/UVSUB/CLINV/SPLAT.  Should be a piece of cake.


>
> BTW - I think you were interested in the task that corrects for pointing
> and phase stopping positions being offset.  That is called CLVLB and is
> available in the 31DEC13 AIPS.  Enno and I did not have the happeist
> results with ot in his test data set.  He got what he claimed were better
> results with a handling of the geometry that I think is not right  (and he
> sort of agrees).  The task has both methods plus debug print options.
>

OK thanks, I'll check it out.

Cheers,
Adam


>
> Cheers
>
> Eric
>
>
> $ PEELR.001
> $---------------------------------------------------------------
> $! RUN file to define procs to calibrate interfering sources
> $# Run POPS UV CALIBRATION
> $---------------------------------------------------------------
> $;  Copyright (C) 2006, 2008
> $;  Associated Universities, Inc. Washington DC, USA.
> $;
> $;  This program is free software; you can redistribute it/or
> $;  and/or modify it under the terms of the GNU General Public
> $;  License as published by the Free Software Foundation; either
> $;  version 2 of the License, or (at your option) any later
> $;  version.
> $;
> $;  This program is distributed in the hope that it will be
> $;  useful, but WITHOUT ANY WARRANTY; without even the implied
> $;  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
> $;  PURPOSE.  See the GNU General Public License for more
> $;  details.
> $;
> $;  You should have received a copy of the GNU General Public
> $;  License along with this program; if not, write to the Free
> $;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
> $;  MA 02139, USA.
> $;
> $;  Correspondence concerning AIPS should be addressed as
> $;  follows:
> $;         Internet email: aipsmail at nrao.edu.
> $;         Postal address: AIPS Project Office
> $;                         National Radio Astronomy Observatory
> $;                         520 Edgemont Road
> $;                         Charlottesville, VA 22903-2475 USA
> $---------------------------------------------------------------
> PROC PEELDEF
> STRING*6  CLSCLS, PCLSTEMP
> ARRAY     PPARM(100)
> SCALAR    PMAX, CLSNUM
> FINISH
> PROC SETCLASS (CLSCLS, CLSNUM)
> pclstemp=char(clsnum)
> substr(clscls,7-leng(pclstemp),6)=pclstemp
> RETURN; FINISH
> PROC CHKIT
> chkname
> if (error <= 0) then;
>    print inna, incl, inse, 'found'; ii=ii+1; end
> return; finish
> $
> PROC PEELR
> $                                            defaults
> if (ngauss < 1) then; ngauss=1; end
> if (outname = ' ') then; outnam=innam; end
> if (outcl = ' ') then; outcl='peelr'; end
> if (outd=0) then; outd=indi; end
> vnum=33-getpopsn; vput peelr; ii = 0; indi=0
> $                                            check files
> inna=outna; incl='peelus'; inse=getpopsn; chkit
> incl='pee001'; for jj=1:ngauss;setclass(incl,jj);chkit; end
> incl='peelw0'; chkit; incl='peelw1'; chkit;
> incl='peelw2'; chkit; incl=outcl; inse=outse
> if (outse>0) then; chkit; end
> if (ii > 0) then;
>    print 'quitting - delete the listed files
>    vget peelr; return; end
> $                                            number of facets
> dowa 1; pmax=10
> for ii=1:100;
>    if ((pparm(ii)<=0) & (pmax>=ii)) then; pmax=ii-1; end; end
> $                                            initial subtraction
> default uvsub; vget peelr; task 'uvsub'
>   nmaps = ngaus*nfield; factor=1; outs=1; outcl='PEELUS'; go
> intyp=' '
> $                                            loop
> for ii=1:pmax;
> $                                            copy facets
>   default subim; vget peelr; task 'subim';
>   blc=0; trc=0; xinc=1; yinc=1
>   inna=in2n; incl=in2cl; inse=in2se; indi=in2d;
>   outc='PEE001'; outs=1
>   for jj=1:ngauss; kk=pparm(ii)+(jj-1)*nfield; setclass(incl,kk)
>      setclass(outcl,jj); go; end
> $                                            add back
>   default uvsub; vget peelr; task 'uvsub'; nmaps=ngauss;
>   inna=outna; incl='peelus'; inse=1; indi=outdi
>   in2n=outna; in2cl='pee001'; in2s=1; in2d=outd
>   outcl='peelw0'; outs=1; factor=-1; go; inty='uv'; zap
> $                                            calibrate
>   default calib; vget peelr; task 'calib';
>   inna=outna; incl='peelw0'; inse=1; indi=outdi
>   in2n=outna; in2c='pee001'; in2s=1; in2d=outd
>   minamp=10; minphs=10;
>   if (aparm(7)=0) then; aparm(7)=2; end
>   if (aparm(9)=0) then; aparm(9)=1; end
>   if (solmod <> 'p') then; solmod='a&p'; end
>   outcl='peelw1'; outse=1; nmaps=ngauss; go
> $                                            skip imagr for now
> $                                            subtract model
>   default uvsub; vget peelr; task 'uvsub'
>   inna=outna; incl='peelw1'; inse=1; indi=outdi
>   in2n=outna; in2cl='pee001'; in2s=1; in2d=outd
>   outcl='peelw2'; outs=1; factor=1; nmaps=ngauss; go
>   inty='uv'; zap; incl='pee001';  inty='ma';
>   for jj=1:ngauss; setclass(incl,jj); zap; end
> $                                            invert SN table
>   default clinv; vget peelr; task 'clinv'
>   inna=outna; incl='peelw0'; inse=1; indi=outdi; outver=1
>   outcl='peelw2'; outs=1; inext='sn'; invers=1; opty=' '
>   go; inty='uv'; zap
> $                                            apply inverted SN
>   default split; vget peelr; task 'split'; aparm=0; echan=0
>   inna=outna; incl='peelw2'; inse=1; indi=outdi; bchan=0
>   outcl='peelus'; outse=1; docalib=1; gainuse=1; douvc=-1;
>   go; inty='uv'; zap
>   end
> $                                            final restoration
> default uvsub; vget peelr; task 'uvsub'
> inna=outna; incl='peelus'; inse=1; indi=outdi
> nmaps = ngaus*nfield; factor=-1; go; zap
> $
> dowa=-1; vget peelr
> return; finish
>
>


-- 
!=============================================================!
Dr. Adam Deller                            Ph  +31 521595780
Veni Fellow, Astronomy Group       Fax +31 521595101
ASTRON, Oude Hoogeveensedijk 4
7991 PD Dwingeloo, The Netherlands
!=============================================================!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/daip/attachments/20130627/cacbd667/attachment.html>


More information about the Daip mailing list