HOW TO work with tp-files

Definition
tp-files are mc-files with a first column of MJD and time parameters. They are mostly used in AG supercampaigning where we have many tighlty sampled data with long breaks inbetween.
If the file name does not indicate a tp-feature, then
tslql filename
will; e.g. (note label `MJD┬┤)
~/TD/a/Allcamps> tslql o/scg-cal-merged-O-expf.ph04.mc
MJD PH04
~/TD/a/Allcamps> tslq o/scg-cal-merged-O-expf.ph04.mc
 <gettsn>d>  11  ->o/scg-cal-merged-O-expf.ph04.mc<- N= -136118  136118
 <gettsn>d> julfil,timef,dt = 55012  0.0000E+00  1.3889E-03 date: 2009-06-30
 <GetTs->>> File MRS=   -9.99999D+04, test,new= F T
 <GETTS->>> #11: o/scg-cal-merged-O-expf.ph04.mc N=136118, Skip=0, Miss=0, Val=136118
 <GETTS->>> Epoch set: 2009-06-30 - Return t0, dt =  0.0000E+00 [s]   5.0000000E+00 [s]
 <GETTS->>> Leap-seconds:   0
 <GETTS->>> at return, nr,t0,dt=  136118  0.000000000000000  1.388888888888889E-003
 <main-->>> after trunc, n,t0=  136118  0.000000000000000  ncut,ncutb,ncute=  1  0  0
 <Main-->>> Remove=F DC-value=   5.6334E+04 from column  1
 <Main-->>>           RMS-dev=   7.5571E+02 from column  1
 <Main-->>> Min =   5.5013E+04 at       1 D T =  2009 06 30 00 00 00 000
 <Main-->>> Max =   5.7153E+04 at  136118 D T =  2009 07 07 21 03 05 000
 <Main-->>> Sampling rate =  1.388889E-03  5.000000E+00
 <Main-->>> t0 from epoch =  0.000000E+00  0.000000E+00
 <Main-->>> File begin: 2009 06 30  00 00 00 MJD=55012
 <Main-->>> File end:   2009 07 07  21 03 05 MJD=55019
 <Main-->>> o/scg-cal-merged-O-expf.ph04.mc Total_miss=0, N=136118, Val=136118, Duration=1.890528E+02

Listing a tp-file:
tslql o/scg-cal-merged-O-expf.rh01.mc
MJD RH01
tslist o/scg-cal-merged-O-expf.rh01.mc -qqq -LM -LR -Ff13.6,1p,e12.4 -Ni -n

         1  55012.979167  3.4911E+03
         2  55012.979282  3.5294E+03
         3  55012.979398  3.5508E+03

...
A standard date field is produced with
tslist o/scg-cal-merged-O-expf.rh01.mc -qqq -LM -LR -Ff13.6,1p,e12.4 -Ni -n |\
  jdc -k3 -j -i1,0,14,-1 -f:i4,2i3.2,a,3i3.2 -mb


set todate = (
jdc -k3 -j -i1,0,14,-1 -f:i4,2i3.2,a,3i3.2 -mb )
tslist o/scg-cal-merged-O-expf.rh01.mc -qqq -LM -LR -Ff13.6,1p,e12.4 -Ni -n | $todate

Listing a section pertaining to a project:

You might like to list the data with index numbers, but then make the gaps smaller. A method to that end is used in ~/TD/a/Allcamps/tpxtsf
This is accomplished with tsfedit, ~/TD/a/Allcamps/tp.tse
TSF EDIT DTP
; Makes time gaps smaller
; A gap larger then 10 days will be narrowed to 10 days
; If segments of the tpoint-file jumps backward in time, the
; jump is converted to forward direction (the reason for the ABS)
FILTER  0 1 ' '
1.0 ${DIFFC:[-1.0]}
CLIP -${CLIPDTP:[10.]} +${CLIPDTP:[10.]}
ABS
IIR 1
1.0 1.0
SHIFT -2
POKE 0. At #2

${CONT}
END

TSF EDIT YEAR
; tslist o/scg-cal-merged.ra.mc -LM -L'M],Rwd' -Ft1,f13.6,f12.6 -N -n1 \
;        -E1:tp.tse,D -E2:tp.tse,Y
; lists the reduced time axis and converts MJD to year
ADD -54832
SCALE / 365.25
ADD 2009
END


tslist o/scg-cal-merged.ra.mc -LM -LR -Ft1,f13.6,f10.2 -N -n1 -Etp.tse,D
 <Main-->>> Calling TSF_EDIT on data column   1  File tp.tse Option D
 <TsfEdi>>> iuins,n,t0,dt=  4  91717  0.000000000000000  1.388888888888889E-003  TRG->D<-
0<TsfEdi>>> START ->TSF EDIT DTP<-->D<-
 <TsfEdi>C> ->FILTER   0 1 ' ' ;<-
 <SFiNrm>>> normalized output =  F
 <tsfedi>d> f(all):   1.00000000000000 -1.00000000000000
 <FILTER>>> LENGTH_OFF_CENTRE:     1    0 (forw., backw) has changed.
 <FILTER>>> QSymm,QAnti= F F, Step-rsp.: 0.0000D+00, Nfp,m N.in .out .miss: 1 0 91717 91716 0, t0, dt: 5.0000 [s] 5.0000 [s]
 <TsfEdi>C> ->CLIP -10. +10. ;<-
 <TsfEdi>C> ->ABS ;<-
 <TsfEdi>C> ->IIR 1 ;<-
 <TsfEdi>>> IIR filter of length     1
 <TsfEdi>>>   1.0000  1.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000  0.0000
 <TsfEdi>>> IIR or AR convolution done, nfp=  1  f(0)=  1.00000000000000
 <TsfEdi>C> ->SHIFT -2 ;<-
 <TsfEdi>C> -> ;<-
 <TsfEdi>>> End Block - Good bye. nxr=   91717 dt=  5.0000E+00 [s]
>
     0.000116   -244.89
     0.000116   -250.88
     0.000231   -171.42

...
 
tslist o/scg-cal-merged.ra.mc -LM -L'M],Rwd' -LR -Ft1,f10.6,f14.8,1p,e12.4 -N -n1 -E1:tp.tse,D -E2:tp.tse,Y
...
  0.000000 2009.50209236 -2.4489E+02
  0.000116 2009.50209268 -2.5088E+02
  0.000231 2009.50209300 -1.7142E+02
  0.000347 2009.50209332 -2.9366E+02
  0.000463 2009.50209363 -2.4272E+02
  0.000579 2009.50209395 -2.0516E+02
...


Creating tp-files

A program like urtapt creates a file *.jd.ts and e.g. a data file *.ra.ts when a so-called merged dump is input. 
Both files are tighly filled and have nuisance time parameters for epoch, dt and t0.
The Fortran code for writing the jd-file containing the MJD's of each sample is in ~/tap/t/m/urtapt-getdump.fi
rm file.mc
tslist file.jd.ts -I -O:MJD file.mc
tslist file.ra.ts -I -O:RA file.mc
You should never combine files from different runs of urtapm / urtapt


.bye