PKS70 Survey Refolding Tutorial
Be careful! The documentation on this page is for the PKS70 survey. The steps might be different if you are working on a different survey/project.
Introduction
This tutorial will walk you through the process of refolding a pulsar candidate. Refolding is the process of confirming potential candidates by folding the data at the candidate’s period (P), period derivative (PD), and dispersion measure (DM). This process is necessary because the candidates are not folded in the first place due to the large number of candidates produced by the pipeline.
The data for the PKS70 survey is hosted on the Mars server at F&M, thus you will need to be connected to the F&M network to access the data. If you are not on campus, you can connect to the F&M network using a VPN.
The steps for refolding are different depending on the operating system you are using.
Refolding on MacOS
Step 0: Preparation
For MacOS
Basic knowledge of the Linux command line: Intro to Linux
For Windows
Basic knowledge of the Linux command line: Intro to Linux
Install PuTTY. This is a terminal emulator for Windows. You will need this to connect to the Mars server.
Step 1: Connect to the Mars server
For MacOS
Open a terminal (from launchpad or spotlight) and connect to the Mars server using the following command:
You will be prompted to enter your password. Enter the password you have been given and press enter. You will not see the password as you type it.
For Windows
Open PuTTY and enter the following information:
Host Name:
pulsar@mars.fandm.edu
Keep the default settings and click “Open”. You will be prompted to enter your password. Enter the password you have been given and press enter. You will not see the password as you type it.
Step 3: Link the data directory
Starting from this step, you will need to refer to the PKS70 Survey Refold Master Grid.
The table looks like this:
# Position DM Period (ms) Period (s) Period Derivative Prepfold Sigma Filename Refolded?
Example 00:00:00.0, 00:00:00.0 30.43 0.01232958623 1.23E-02 -1.40E-07 6.7 S00001_1.fil none (WX1)
0 17:07:30.0, -14:57:00.0 65.395 26.55386219 0.0265538622 -1.26E-07 7.5 S00901_3.fil maybe (WX1)
The first row is an example row. The first column is the position of the candidate. The second column is the dispersion measure (DM) of the candidate. The third column is the period of the candidate in milliseconds (ms). The fourth column is the period of the candidate in seconds (s). The fifth column is the period derivative of the candidate. The sixth column is the prepfold sigma of the candidate (signal-to-noise ratio). The seventh column is the filename of the candidate. The eighth column is the status of the candidate. If the candidate has not been refolded, the status will be empty.
You will need to find the candidate you want to refold in the table. Once you have found the candidate, you will need to link the data directory of the candidate to your directory. The data directory is located in /data/pks70/fil/[Filename]
. For example, if you want to refold the candidate S00001_1.fil
, you will need to link the data directory /data/pks70/fil/S00001_1.fil
to your directory. You can link the data directory using the ln
command:
ln -s /data/pks70/fil/S00001_1.fil .
This command will create a symbolic link to the data directory in your directory. The .
at the end of the command means the current directory. You can check the contents of your directory using the ls
command:
ls
You should see the data directory S00001_1.fil
in the output.
Step 4: Refold the candidate
Once you have linked the data directory, you can start the refold. The refold command is prepfold
. You will need to specify the following arguments:
-p
: period of the candidate in seconds (s), not milliseconds (ms)-pd
: period derivative of the candidate-dm
: dispersion measure (DM) of the candidate
Then you will need to specify the filename of the candidate, using the following command:
prepfold -noxwin -p [PERIOD IN SEC.] -pd [PERIOD DERIVATIVE] -dm [DM] -nodmsearch [FILENAME]
Be careful! The period argument is in seconds (s), not milliseconds (ms). Therefore, always use the “Period (s)” column in the table.
For example, if you want to refold the candidate S00001_1.fil
with period 0.01232958623 s, period derivative 0.00000000014, and dispersion measure 6.7, you will need to run the following command:
prepfold -noxwin -p 0.01232958623 -pd 0.00000000014 -dm 6.7 -nodmsearch S00001_1.fil
The refold will take a few minutes to finish. Once the refold is finished, you will see a few more files in your directory, starting with S00001_1_
. You can check the list of files in your directory using the ls
command:
ls
You should see the following files:
S00001_1_13_12.33ms_Cand.pfd S00001_1_13_12.33ms_Cand.pfd.bestprof S00001_1_13_12.33ms_Cand.pfd.png S00001_1_13_12.33ms_Cand.pfd.ps S00001_1.fil
Step 5: Download the refolded files
Once the refold is finished, you can download the refolded files to your local computer.
For MacOS:
You can use the scp
command to download the files. The scp
command is similar to the ssh
command, except it downloads files instead of connecting to the server. The syntax of the scp
command is:
scp [USERNAME]@[SERVER]:[PATH TO FILE] [PATH TO SAVE FILE]
For example, if you want to download the file S00001_1_13_12.33ms_Cand.pfd
to your local computer, you will need to open a new terminal window, without establishing a connection to the Mars server. Then you can run the following command:
scp [email protected]:/home/pulsar/refold/froney/S00001_1_13_12.33ms_Cand.png .
This command will download the file S00001_1_13_12.33ms_Cand.png
to your current directory. You can check the list of files in your directory using the ls
command:
ls
If you are not sure where the file is saved, you can use the pwd
command to check your current directory:
pwd
You should see the file S00001_1_13_12.33ms_Cand.png
in your directory.
For Windows:
You can use the pscp
command to download the files. The syntax of the pscp
command is:
pscp [USERNAME]@[SERVER]:[PATH TO FILE] [PATH TO SAVE FILE]
For example, if you want to download the file S00001_1_13_12.33ms_Cand.pfd
to your local computer, you will need to open a new CMD window, without establishing a connection to the Mars server. (You can open a new CMD window by pressing the Windows key and R at the same time, then type “cmd” and press enter.)
Then you can run the following command:
pscp [email protected]:/home/pulsar/refold/froney/S00001_1_13_12.33ms_Cand.png .
This command will download the file S00001_1_13_12.33ms_Cand.png
to your current directory. You can check the list of files in your directory using the dir
command:
dir
If you are not sure where the file is saved, you can use the cd
command to check your current directory (which is confusingly the same as the cd
command in Linux):
cd
You should see the file S00001_1_13_12.33ms_Cand.png
in your directory.
Step 6: Check the refolded file
Once you have downloaded the refolded file, you can check the file to see if the refold is successful. The refolded file is a PNG image. You can open the file using the Preview app on MacOS. You should see a plot of the folded data.
This plot looks like all other plots on the Candidate Viewer. You should check the following things:
Is there a pulsar-like signal in the plot?
Is the signal strong enough? (signal-to-noise ratio > 6.5)
Is the DM is exactly the same as the DM in the table?
Is the period approximately the same as the period in the table?
If the answer to all of the above questions is yes, then the refold is successful. You can mark the candidate as “cand [YOU INITIALS]” in the table.
If the answer to 3 is no, then the refold is not successful. You should re-run the refold and make sure you are using the correct DM as well as the “-nodmsearch” argument.
if the answer to 4 is no, then the refold is not successful. You should re-run the refold and make sure you are using the correct period and make sure you are using the period in seconds (s), not milliseconds (ms).
If the answer to 1 or 2 is no, then the refold indicates that the candidate is not a pulsar. You should mark the candidate as “none [YOU INITIALS]” in the table.
Step 7: Repeat
Repeat steps 3-6 for all candidates in the table if you are going to continue refolding more candidates.
You do not need to clean up any file in your directory. The files may be checked again by your team leaders. However, you are welcome to move your files to the REFOLDED
directory in your directory if you want to keep your directory clean, with the following command:
mv *png ../REFOLDED
mv *bestprof ../REFOLDED
mv *ps ../REFOLDED
mv *pfd ../REFOLDED
If you have any questions, please contact your team leaders. Good luck and happy refolding!