1. To download the python function called Ersatz.py right click here: ersatz.py and choose 'Save As'. The current name of the fucntion is 'ersatz.py_1.txt', rename it as 'ersatz.py'.
2. Create or download a .txt file specifying the noise characteristics, RFI and bandpass as below:
**************************************
Baseline Lambda 2
Baseline Amplitude 4
Broadband Occurrences 0
Broadband t_start 0
Broadband t_end 0
Broadband Magnitude 0
Narrowband Occurrences 0
Narrowband F_start 0
Narrowband F_end 0
Narrowband t_start 0
Narrowband t_end 0
Narrowband Magnitude 0
Periodic Broadband Occurrences 0
Periodic Broadband Period 0
Periodic Broadband Duty cycle 0
Periodic Broadband t_start 0
Periodic Broadband t_end 0
Periodic Broadband Magnitude 0
Periodic Narrowband Occurrences 0
Periodic Narrowband Period 0
Periodic Narrowband Duty cycle 0
Periodic Narrowband F_start 0
Periodic Narrowband F_end 0
Periodic Narrowband t_start 0
Periodic Narrowband t_end 0
Periodic Narrowband Magnitude 0
BandPass ramp-up 0.3
BandPass ramp-down 0.2
BandPass Amplitude 0.5
**************************************
Identifier |
Description |
Baseline |
Precedes the variables associated with the non-stationary baseline. |
Broadband |
Precedes the variables associated with impulse RFI. |
Narrowband |
Precedes the variables associated with narrowband RFI. |
Bandpass |
Precedes the variables associated with giving the bandpass a shape. |
Baseline Lambda |
Non-stationary baseline correlation length in seconds. |
Baseline Amplitude |
Amplitude of the non-stationary noise (0< value ≤ 6). |
Occurrences |
Number of RFI instances. |
t_start |
The start time of the RFI instances (s) |
t_end |
The end time of the RFI instances (s) |
Magnitude |
The magnitude of the noise i.t.o. the number of standard deviations from the expected value (0< value ≤6)
|
F_start |
First frequency affected by RFI artefact (MHz) |
F_end |
Ending frequency affected by RFI artefact (MHz) |
Period |
Period of the periodic noise (s) |
Duty cycle |
Specify how long the RFI should be 'on' as a percentage of its period (0<value<99). |
Ramp-up |
Specify the protion of highest frequency channels to be modulated (0<value<1). |
Ramp-down |
Specify the portion of lowest frequency channels to be modulated (0<value<1). |
Amplitude |
Specifies the height of the slope (0<value<1). |
NB. If any of the noise phenomena should be ignored just set the 'Occurrences' variable to zero.
NB. For the bandpass shape to be enforced the flag '"--bandPass" should be set when ersatz.py is called.
3. An example of how to call the function:
>> python ersatz.py --tobs 20.0 --tsamp 64 --fch1 1536 --foff -0.62890625 --nchans 512 --nbits 8 --noiseInput FakeNoiseParameters.txt --stationary "No" --bandPass