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

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 2: Navigate to your directory

Once you are connected to the Mars server, you will be in the home directory of the pulsar user. You can check your current directory using the pwd command:

pwd

You should see /home/pulsar as the output. This is the home directory of the pulsar user. You will need to navigate to your directory to run the refold. Your directory is located in /home/pulsar/refold/[YOUR NAME]. You can navigate to your directory using the cd command:

cd /home/pulsar/refold/[YOUR NAME]

For example,

cd /home/pulsar/refold/froney

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:

  1. Is there a pulsar-like signal in the plot?

  2. Is the signal strong enough? (signal-to-noise ratio > 6.5)

  3. Is the DM is exactly the same as the DM in the table?

  4. 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!