Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/pfold.html
AHELP for CIAO 4.17

pfold

Context: Tools::Timing

Synopsis

Folds events into multiple periods

Syntax

pfold  infile outfile periodgrid [dtffile] [pdot] [nphase] [tzero]
[clobber]

Description

`pfold' folds an event file into a grid of period bins with a fixed number of phase bins. If a good time interval (GTI) is attached to the input file, the first block is used to exposure-correct each bin. Similarly, if a dead time factor (DTF) file is supplied, then a further per-bin DTCOR correction is applied.


Examples

Example 1

pfold acis_evts.fits fold.fits 2:2000:1 nphase=10

Folds the events into 10 phase bins with periods ranging from 2 sec to 2000 secs in steps of 1 sec. The first GTI will be used to correct the count_rate column.

Example 2

pfold hrc_evts.fits fold.fits 2:2000:1 nphase=10 dtffile=hrc_dtf.fits

An HRC file is folded into 10 phase bins with periods ranging from 2 sec to 2000 secs in steps of 1 sec. The DTF file is used to correct the count_rate column.


Parameters

name type ftype def reqd
infile file input   yes
outfile file output   yes
periodgrid string     yes
dtffile file input   no
pdot real     no
nphase integer   10 no
tzero real     no
clobber boolean   no no

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input event file

The input event file should have a 'TIME' column and be sorted in time (i.e. chronological events). If present, the first GTI block will be used to correct the count_rate column.

Parameter=outfile (file required filetype=output)

Output file

The output file has one row per period. There are array-columns for the phase, counts, rate, ontime (exposure), dtf, and a scalar mean_rate and sigma_rate.

Parameter=periodgrid (string required)

Grid of periods to search

This should take the form of min:max:step, where step can be

Parameter=dtffile (file not required filetype=input)

Dead time factor file

The file must have TIME and DTF columns, e.g. an HRC dead time factor (DTF) file. This file may be created by running the dither_region tool.

A Data Model filter is used to specify the TIME and DTF columns in the file. DM syntax allows the user to specify a column with a different name as the DTF information, e.g.

"fracarea.fits[cols time,dtf=fracarea]"

Parameter=pdot (real not required)

Derivative of period

Parameter=nphase (integer not required default=10)

Number of phase bins

Parameter=tzero (real not required)

The zero time for start of phase bin.

Setting tzero=INDEF (the default) uses the time of the 1st GTI record. Users trying to match the phase between observations (or observatories) should set tzero to a specific value.

Parameter=clobber (boolean not required default=no)

Overwrite existing output dataset with same name?


Changes in CIAO 4.15

The period must be positive, so the tool now errors out if the periodgrid evaluates to any values 0 or less. The behavior has been improved for periods significantly smaller than 1.


Bugs

There are no known bugs for this tool.

See Also

contrib
lc_clean, lc_sigma_clip, lightcurves
tools::acis
multi_chip_gti
tools::aspect
get_dither_parameters, monitor_photom
tools::timing
axbary, deflare, glvary, gti_align