Tool for identify the presence of RFI in an observation, flagging and visualisation
Project description
RFInder
Insallation instructions
pip install rfinder
To create a local repository, type:
git clone git@github.com:caracal-pipeline/RFInder.git
Requisites
For a successfull installation make sure to have installed the following packages.
- RFInder makes use of the most common
pythonpackages (e.g.numpy,scipy,astropy). - The parameter file is in
yamlformat, hencepyaml, andjsonpackages should be installed, - The
loggingmodule is used to print out warnings. .giffile of multiple plots can be created ifffmpegis installed.casacoreis utilized to open casa tables.- install it with
python_casacore:pip install python-casacoreorconda install -c conda-forge python-casacore
- install it with
texmakerto plot latex fancy formulaedvipngpython tk- RFInder class
rfinder_uzero.pywhich can be used to solve the u=0 problem makes use ofwsclean, which must have been previously installed.
Description
This is a set of tools that have been developed in preparation of the Apertif & MeerKAT surveys.
The main function of rfinder is to identify the presence of RFI in an observation and visualize it according to different parameters. Two are the main functions:
- estimate the RFI present in an MS file through a sigma clipping (
rms_clip) - read the
FLAGcolumn of an MS file (use_flags) and summarize how RFI affects the data products of an observation.
These are the products that rfinder provides and summarizes in an .html file:
- presence of RFI per frequency channel and baseline length.
- percentage flagged visibilities due to RFI per frequency channel.
- increase in noice due to RFI per frequency channel.
- estimated noise per frequency channel, assuming natural weighting.
check out the WiKi for a complete illustration of RFInder.
Usage
RFInder takes its variables from a default parameter file and from terminal, if any are given.
From your current working directory typying rfinder this message will be shown:
------ Reading default installation parameter file ------
MSNAME & telescope missing
please edit rfinder_default.yml in your current directory
or run: rfinder -i msname -fl <num> -tel <meerkat,apertif,wsrt>
(assuming the observation is located in your current directory)
------ RFInder out ------
Hence, you have to set the name of the MSfile you wish to analyse. There are two ways to do this. By specifying from terminal the path to the msfile from your current directory, the field number of the source you whish to analyse, and the telescope of the observation:
rfinder -i msname -fl <num> -tel <meerkat,apertif,wsrt>
or, editing the rfinder_default.yml configuration file that has been copied in your current directory (workdir, in the configuration file).
This configuration file is read automatically by RFInder through the command rfinder. A short explanation of the parameters is given in the configuration file, and by typing rfinder -h (see below).
If you wish to use a different configuration file (at your own risk!!), type: rfinder -c <path_to_configuration_file>.
Minimal instructions
-
Default
rfinderwill scan the MSfile in chunks of 10 minutes averaging 10 channels together. The output product will be anhtmlfile where thegisscan through the time steps to show the identified RFI/flags. -
Running
rfinder -noChafterrfinderwill produce afull_report.htmlfile containing both the analysis over time steps and the analysis of the dataset as a whole. -
Running
rfinder -noCh -noMovwill analyse the full dataset as a whole and generate thefull_report.htmlwithout embedded movies.
Attention: the option rfinder -noCh will end with a report successfully generated, only if it is run after rfinder. Otherwise run rfinder -noCh -noMov.
(These tutorials show the different capabilities of rfinder. outdated)
Output products
If rfinder runs correctly, you will find the following output products in your current directory:
- the folder
rfi_polin your current directory, or in the directory specified by the-odirparameter (polis the stokes parameters for which you analysed RFI).- Within, there are the
.htmlreports that you wished to generate.
- Within, there are the
- The configuration file
rfinder_default.ymlcontains the parameters of the last run. - A
logof the commands run by the program is stored inlog-rfinder.log, in your working directory.
Help
rfinder -h will show you a (minimal) help:
usage: rfinder [-h] [-v] [-c CONFIG] [-w WORKING_DIR] [-odir OUTPUT_DIR]
[-i INPUT] [-fl FIELD] [-tel TELESCOPE] [-mode RFIMODE]
[-pol POLARIZATION]
[-fint [FREQUENCY_INTERVAL [FREQUENCY_INTERVAL ...]]]
[-spwAv SPW_AV] [-tStep TIME_STEP] [-sig SIGMA_CLIP]
[-baseCut BASELINE_CUT] [-noCh] [-yesCh] [-noSpw] [-yesSpw]
[-noClp] [-yesClp]
RFInder: package to visualize the flagged RFI in a dataset
version 1.0.3
install path /home/maccagni/programs/RFInder/rfinder
Filippo Maccagni <filippo.maccagni@gmial.com>
optional arguments:
-h, --help Print help message and exit
-v, --version show program's version number and exit
-c CONFIG, --config CONFIG
RFInder configuration file (YAML format)
-idir INPUT_DIR, --input_dir WORKING_DIR
select working directory (MS file assumed to be here)
-odir OUTPUT_DIR, --output_dir OUTPUT_DIR
select output directory
-i INPUT, --input INPUT
input ['MS'] file
-fl FIELD, --field FIELD
select field of MS file to analyze
-tel TELESCOPE, --telescope TELESCOPE
select telescope: meerkat, apertif, wsrt
-mode RFIMODE, --rfimode RFIMODE
select mode where to investigate RFI: use_flags or
rms_clip
-pol POLARIZATION, --polarization POLARIZATION
select stokes parameter: xx, yy, xy, yx, q (also in
CAPS)
-fint [FREQUENCY_INTERVAL [FREQUENCY_INTERVAL ...]], --frequency_interval [FREQUENCY_INTERVAL [FREQUENCY_INTERVAL ...]]
select frequency interval where to measure noise in
GHz
-spwAv SPW_AV, --spw_av SPW_AV
select number of channels to average
-tStep TIME_STEP, --time_step TIME_STEP
select time step in minutes in which divide the
analysis of the MSfile
-sig SIGMA_CLIP, --sigma_clip SIGMA_CLIP
select sigma clip for rms_clip mode to find RFI
-baseCut BASELINE_CUT, --baseline_cut BASELINE_CUT
select cut in baseline lenght [m] for differential RFI
analysis
-noCh, --no_chunks desable chunking in time
-yesCh, --yes_chunks enable chunking in time
-noSpw, --no_spw_av desable averaging in channels
-yesSpw, --yes_spw_av
enable averaging in channels
-noClp, --no_cleanup desable cleanup of intermediate products
-yesClp, --yes_cleanup
enable cleanup of intermediate products
Run a command. This can be:
rfinder
rfinder -c path_to_config_file.yml
rfinder -i <ngc1399.ms> -fl <num> -tel <meerkat/apertif/wsrt>
License
This project is licensed under the GNU General Public License v3.0 - see license for details.
© Filippo M. Maccagni 2018
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rfinder-1.1.0.tar.gz.
File metadata
- Download URL: rfinder-1.1.0.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c44b123a0b00103667556d2b5c1862f9061571a4ac156e27349528afe6e74049
|
|
| MD5 |
f46d953dbcb96ae82d6836456e6edbd4
|
|
| BLAKE2b-256 |
67ed0e6c7123e8f0040eb9cae927e72133cc1c5ab0282bb73e71518fa7522dd7
|
File details
Details for the file rfinder-1.1.0-py3-none-any.whl.
File metadata
- Download URL: rfinder-1.1.0-py3-none-any.whl
- Upload date:
- Size: 50.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bdc72c6f8335f20302a80115789bb79b6481b52461235ee0661e651cab17e4f
|
|
| MD5 |
915f35773ec23be940ac1675eca395cd
|
|
| BLAKE2b-256 |
769a3bb758e0b31179966132855eb5c288473426c4c55c1cbe60ddf81a37531f
|