Return to: Part I - Run Pointlike Interactively |
DataSpecification | |||||
Note: To view the DataSpecification/SpectralAnalysis code, see: Viewof/pointlike/python/uw/like/pointspec.py. |
Name | Description | |
ft1files | String pointing directly to an FT1 file or to a list of FT1 files. | |
ltcube | Livetime cube calculated by gtltcube. | |
binfile | A fits file with the FT1 file binned in healpix.
Binfiles are always allsky files, so your binned data is efficiently saved for further use.
|
|
|
Name | Default value | Description |
binsperdec | Number of energy bins per decade of energy. | |
emin | Minimum energy (in MeV); left edge of the lowest energy bin. Only applied if binned photon data is being created for first time. | |
emax | Maximum energy (in MeV); right edge of the highest energy bin. Only applied on initial binning. | |
irf | Instrument response function. | |
roi_dir | None | Center of the region where livetime and exposure is calculated. If this is not set, an allsky exposure/ livetime will be generated. |
roi_dir=180 creates a full sky analysis. | ||
exp_radius | 20 degree exposure for if roi_dir is set; allsky if roi_dir is not set. |
Radius (deg) to use if calculate exposure or a ROI. |
minROI/maxROI | Minimum and maximum region of interest (ROI) for the analysis (in degrees). Generally, ROI radius is energy-dependent: minROI < r95(e,conversion_type) < maxROI. | |
That is, the radius is given by the 95% PSF containment Set minROI=maxROI to have a uniform ROI over all energy. |
||
conv_type | -1 | Select conversion type (0-front; 1-back; -1 = front+back) |
zenithcut | 105 | Maximum spacecraft pointing angle to allow with respect to zenith. |
thetacut | 66.4 | Cut on photon incidence angle. |
event_class | 3 | Select class level (3-diffuse; 2-source; 1-transient; 0-Monte Carlo) |
tstart | 0 (no cut on time) | Cut on MET > tstart |
tstop | 0 (no cut on time) | Cut on MET < tstop |
Note: To view the ROI Object code, see: pointlike/python/uw/like/roi_analysis.py |
Name | Description |
roi_dir | The center of the ROI must be specified using as a skymaps.SkyDir object. |
xmlfile | Background models and sources can be specified in a source xml file. The format of the xml file is the same as for gtlike, although some of the more complicated spectral models may not yet be implemented. Note: If you find any inconsistencies in the xml model, please report this to a developer. |
phase_factor | If the data has had a phase cut applied to it (for pulsars), this is the fraction of events passing the cut. |
In addition to specifying gtlike style sources, you can also read in a catalog of background sources and add all the background sources to the ROI. The location of the catalog can be specified with the catalogs flag. Any catalog sources closer than 0.1 degrees of sources already defined in the xml file will not be included, and any catalog source with a similar name to a source specified in xml will not be included. So it is easiest to define your diffuse model and particular sources of interest in the xml, but get the rest of the catalog sources from the catalog file. Even if you read a bunch of background sources from the catalog, when the xml file is written out, all of the background sources will be saved into the resulting xml file. When a catalog is read in with the catalogs flag, by default, only sources within 2 degrees will be fit. Sources farther away will be fixed to their catalog values. As shown below, you can change this default radius by passing into roi_from_xml instead a FermiCatalog object: from uw.like.pointspec_helpers import FermiCatalog catalogs = [ FermiCatalog("gll_psc_v03.fit",free_radius=10) ] Note: Sources from the catalogs argument are added to the model up to a hardcoded radius maxROI+5 from the roi center. In recent versions of pointlike, the XML file is also cut off at the same radius. |
|
catalogs | |
fit_emin/fit_emax | The minimum and maximum energies to use in spectral fitting. This is generally useful if you want to use the same energy binned data (or keep the energy binning consistent with the CALDB file), but then want to change which of the energy bins are used for a spectral analysis. |
Name | Default value | Description |
emin | 100 | Lower bound in MeV. |
emax | inf | Upper bound in MeV. |
e_weight | 0 | Energy power by which to scale dN/dE. |
cgs | False | If True, energy in ergs, else in MeV. |
error | False | If True, return value is a tuple with flux and estimated error. |
two_sided | False | If True, return value is a triple with flux, estimated high and low errors. |
Name | Default value | Description | |||
method | simplex | Choose between 'simplex', 'powell', and 'minuit'. | |||
tolerance | 0.01 | Approximate absolute tolerance of log likelihood value. | |||
save_values | True | Store fit values in ROI after fit. | |||
do_background | True | Calculate errors on the diffuse source's spatial parameters. | |||
fit_bg_first | False | Before doing the global fit, freeze all point sources and first fit the diffuse sources. | |||
estimate_errors | True | Estimate th05/24/2011 | error_for_steps | False | Use previously estimated errors for the fitting algorithm's initial step size. |
use_gradient | False | Use an analytic gradient of the spatial parameters when doing a spectral fit. Only supported for some spectral models. Note: The analytic gradient is only used for spectral fitting (not localizing or extension fitting). |
|||
gtol | 1e-1 | When using the analytic gradient, Gradient norm must be less than gtol before successful termination. | |||
Name | Default value | Description |
quick | The TS function takes the parameter quick which defaults to True. | |
If quick=True, | the likelihood is calculated with source flux set to 0. | |
If quick=False, | the code does a full refit of all other free sources for the null hypothesis. | |
Note: quick=False is the same as setting reoptimize=True in gtlike. | ||
which | Name of the source. | |
method | Fitting algorithm method. | |
bandfits | Calculate the TS of your source without assuming a spectral model by fitting the flux in each energy bin independently. | |
Name | Description | |
ll | Note: You can get the total loglikelihood using: ll=-1*roi.logLikelihood(roi.parameters()) This function returns the negative log likelihood (suitable for minimization) so must be multiplied by -1. |
|
Name | Default value | Description |
which | central source | Name of the source to localize. For sources not at the ROI center, make sure the ROI is large enough. |
tolerance | 1e-3 | Maximum difference in degrees between two successive best fit positions. |
update | False | If True, update localization internally after fit, i.e., recalculate point source contribution. |
verbose | False | Print out more information during the fit. |
bandfits | False | If True, use a band-by-band (model independent) spectral fit; otherwise, use broadband fit with the spectral model of the source. |
seedpos | False | If set, use this position instead of the source position. |
Name | Default value | Description |
roi | ROIAnalysis object. | |
which | 0 | Index of source to plot. |
axis | None | 1e2, 1e5, 1e-8, 1e-2 depending on use_ergs |
butterfly | True | Plot model with a butterfly outline. |
use_ergs | True | Convert to ergs in the flux units and use GeV on the x-axis. |
outdir | None | If set, save sed into <outdir>/<source_name>_sed.png if outdir is a directory; save into filename=<outdir> if not. |
galmap | True | Plot position on galactic map if set. |
printout* | False | If True, print the sed points to stdout. |
Name | Default value | Description |
which | Index of the point source for which to compute the limit. | |
confidence | .95 | Desired confidence level of the upper limit. |
integral_min | -15 | Lower limit of the likelihood integral in log space. |
integral_max | -8 | Upper limit of the likelihood integral in log space. |
simps_points | 10 | Number of evaluation points per decade for Simpson's rule. |
Name | Default value | Description |
tolerance | 0.05 | This is passed into Minuit while fitting the extension parameters. |
bandfits | False | Whether to use a spectral independent model when fitting extension. |
use_gradient | False | If bandfits is False, whether to use the analytic gradient when fitting spectral parameters (during an iteration for a given extension). |
Name | Default value | Description |
size | 2 | Size, in degrees, of the image. |
pixelsize | 0.1 | Size, in degrees, of pixels |
proj | 'ZEA' | Projection type. |
galactic | False | Use galactic or equatorial coords. |
center | coords of image center. Default will be the ROI Center. |
|
photon_index | 2 | Assumed spectral index of the new source used in the tsmap. |
spectral_model | None | Instance of spectral model (from Models.py) to use for TS calc. This will override photon_index. |
Name | Default value | Description |
figsize | ((12,8)) | Physics Size of the image. |
fignum | 3 | matplotlib figure number. |
pixelsize | 0.25 | Size of each image pixel. |
size | 10 | Size of the field of view. |
nticks | 5 | Number of axes tick marks. |
log_counts_min | 1.0 | Counts scale minimum. |
log_counts_max | 2.5 | Counts scale maximum. |
label_sources | False | Label sources during plot. |
galactic | True | Coordinate system for plot. |
Name | Description |
cpt_class | A counterpart class (or list of classes) to use for associations; should have a python module named for it in the classes directory, e.g., 'crates' will use info from the crates.py module). If None, will use all available. |
name | Name of the LAT source. If provided, the association will be saved in the dictionary sa.sources, with name as the key (where sa is the instance of SourceAssociation). Otherwise, the return dict will not be saved. |
trap_mask | If true, uses a slightly different selection of sources for computing counterpart densities. |
Note: This is here only for compatibility with gtsrcid. | |
unique | If true, compute probabilities for unique associations (one counterpart per LAT source). |
Owned by:Joshua Lande |
|
Last updated by: Chuck Patterson 05/24/2011 |