Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PFD file format? #183

Open
indrajitbarve opened this issue Mar 1, 2023 · 4 comments
Open

PFD file format? #183

indrajitbarve opened this issue Mar 1, 2023 · 4 comments

Comments

@indrajitbarve
Copy link

Dear Scott ransom,

I would like to plot the .pfd profs cube data. Able to read the data but while plotting not able to get the plot like .ps file it generates. Can you please share the data format or what additional information (scalling) needed to plot the data.

@scottransom
Copy link
Owner

If you want to regenerate the original .ps plot, you can use the show_pfd command on the .pfd file. There are several options that let you (slightly) modify the plot. You can also read the .pfd and plot it any way you want with the prepfold.py python module that is included in PRESTO. Let me know if you need more specifics.

@scottransom
Copy link
Owner

BTW, the .pfd file itself is simply a C structure (of type PREPFOLDINFO) stored in binary format. Most of it is described in the header file include/prepfold.h. And you can see how it gets written and read in src/prepfold_utils.h

@indrajitbarve
Copy link
Author

Dear Scott Ransom,

Thanks for your reply, I am able to read the data from the struct data cube from the "profs" section. The only thing is I am trying to plot a few selected data bands from the cube. When I plot it is not able to replica the plot. So I found from the pfd plotting code some scaling and shifting happening. I will go through the prepfold_utils.h further. Thanks ..

@scottransom
Copy link
Owner

Note that in prepfold.py, there is a greyscale() method which uses the same scaling as in the prepfold plots. And there are also plot_intervals() and plot_subbands() methods which use the greyscale() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants