Skip to content

Commit b2f9ce5

Browse files
Add files via upload
1 parent 84cf6e6 commit b2f9ce5

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

_posts/tutorials/removerfi.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
layout: page
3+
type: tutorial
4+
title: Removing RFI From Archival Data
5+
permalink: tutorials/remove-rfi
6+
---
7+
8+
# Removing RFI From Archival Data
9+
10+
To begin data analysis on observation data, we must first download the archive files from the [LWA Pulsar Archive](https://lda10g.alliance.unm.edu/PulsarArchive/). This can be done with two commands, wget, or the alias download.
11+
12+
First, navigate to your home directory on a UCF node at
13+
14+
```sh
15+
/home/uvastudent/uva_students/<computing ID>
16+
```
17+
18+
Remember to check for an available node at
19+
20+
http://lwalab.phys.unm.edu/CompScreen/cs.php
21+
22+
The function wget will access and download files from a given web address. For example, to download the 35.1 MHz archive (``.ar``) file on MJD=58835 for pulsar J1929+00, the command line will read
23+
24+
```sh
25+
wget https://lda10g.alliance.unm.edu/PulsarArchive/J1929+00/58835/58835_J1929+00_35.1MHz.ar
26+
```
27+
28+
We can choose to download all four ``.ar`` files by using the wildcard operator ``*`` like so:
29+
30+
```sh
31+
wget https://lda10g.alliance.unm.edu/PulsarArchive/J1929+00/58835/*.ar
32+
```
33+
34+
Better yet, we can use the alias download to retrieve ``.ar`` files from several observations. Use the command
35+
36+
```sh
37+
download --help
38+
```
39+
40+
to review the functions of the alias.
41+
42+
This alias allows us to input start and end dates for the data download. Continuing from the previous example, if we want to download all ``.ar`` files from MJD=58531 to MJD=58835, type
43+
44+
```sh
45+
download J1929+00 --start_date=58531 --end_date=58835
46+
```
47+
48+
Checking the Pulsar Archive website, this command spans three observations, or 12 ``.ar`` files. While using download is an efficient way to retrieve many data files, each file is on the order of 1 GB in size, so do not download many (8+) files at once.
49+
50+
Now, with your ``.ar`` files downloaded, we will perform pscrunch on the files, which removes unneeded polarization data from the ``.ar`` file.
51+
52+
```sh
53+
pam -p -e pscrunch *.ar
54+
```
55+
56+
Using the wildcard operator, we can scrunch all of the data at once.
57+
58+
Once the data has been scrunched, we can begin zapping data. This allows the data to be visualized in an array, and eliminating RFI is easier to interpret.
59+
60+
We can open a ``.scrunch`` file with the command
61+
62+
```sh
63+
psrzap 58835_J1929+00_35.1MHz.scrunch
64+
```
65+
66+
This command will bring up two PGPLOT windows, shown below:
67+
68+
The window with three graphs displays: 1) the pulse profile, 2) frequency vs. pulse phase, 3) time vs. pulse phase. As we eliminate RFI, the pulse profile should become more defined.
69+
70+
The other window with a single plot displays the data as a visual array of the data, organized by frequency and sub-integration index. We will be working with this plot to visually eliminate the RFI in our data. Bright spots in the data represent RFI, which we want to eliminate. Each time a pixel of RFI is eliminated, the plot will recalibrate its display values.
71+
72+
Sometimes, RFI is so strong that the plot looks empty save for a few rectangles. Once these are elimnated, the rest of the data will become visible.
73+
74+
Clicking into the single plot, we will use an array of commands to "zap" the RFI.
75+
76+
r - "reset" - rescales the zoom to display the whole plot, but will not reset the plot to the original state
77+
t - "time" - changes the pointer to a vertical line
78+
f - "frequency" - changes the pointer to a horizontal line
79+
b - "both" - changes the pointer to crosshairs (default)
80+
u - "undo" - will undo the last "zap" in case the wrong pixel was selected
81+
s - "save" - will save the file and all your progress
82+
q - "quit" - allows the user to safely exit the program
83+
84+
To mark a pixel, row, column, or rectangle, right click the selection, and type 'r' to eliminate the RFI. To zoom into a section, left click to establish the left bound, then
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+

0 commit comments

Comments
 (0)