Ask a Question | Search PSRCHIVE: |
Home
|
PSRCHIVE documentation: psrchive_config1.0 PurposeVarious features of the PSRCHIVE library can be configured using a simple text file. This page describes how to use this configuration file and how the psrchive_config program can be used to generate and update the configuration file.2.0 UsagePSRCHIVE looks for a configuration file in the following two locations:$PSRCHIVE_CONFIG $HOME/.psrchive.cfgFor example, the $PSRCHIVE_CONFIG environment variable may be used to set the location of a configuration file that is shared by a research group, and the $HOME/.psrchive.cfg configuration file can be used by individual researchers. Configuration files are optional and, if both of the above files are found, they will be parsed in the above order such that options configured in the $HOME directory file will over-ride those found in $PSRCHIVE_CONFIG. Configuration options are specified as key = value pairs and comments preceded by a hash (#) character are ignored. 2.1 Creating a configuration fileTo create a template configuration file containing every available configuration option, run psrchive_config; e.g. psrchive_config > $HOME/.psrchive.cfgIf this is the first time that the program is run, then all configuration options will be commented and the file will have no effect. To set a configuration option, simply uncomment the line for the key = value pair and set the value as required. 2.1 Updating a configuration fileOver time, new configuration options will be introduced. To update your configuration file, simply run psrchive_config > $HOME/.psrchive.cfgNote the psrchive_config will preserve all previously set configuration options from both $PSRCHIVE_CONFIG and $HOME/.psrchive.cfg. These will appear in the output configuration file uncommented. 3.0 AlgorithmsPSRCHIVE configuration options are declared using thePulsar::Config<> template class, which is
documented in the Adding a
Configuration Option tutorial.
4.0 Testing and examplesTo change the default width of the window used to find the off-pulse baseline, look for the following lines in the template configuration file########################################################################### # # Profile::default_duty_cycle - Duty cycle of baseline [turns] # # The default width of the window used to find the off-pulse baseline # and compute its statistics # # Profile::default_duty_cycle = 0.15and change the last line to Profile::default_duty_cycle = new value 5.0 Known bugs and features that require implementation
|