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

add_noise_to_model includes Ecorr even if -pta flag is different from NANOGrav in timfile #44

Closed
FrancescoIraci opened this issue Jul 21, 2023 · 4 comments

Comments

@FrancescoIraci
Copy link

FrancescoIraci commented Jul 21, 2023

In the notebook [https://github.com/nanograv/pint_pal/blob/main/nb_templates/process_v1.2.ipynb] I'm facing an issue with the function nu.add_noise_to_model: I'm running the noise analysis using the timfile attached, with flags -pta EPTA and -f ciao (dummy variable). Since -pta flag is different from NANOGrav, the ecorr parameter is not included in the noise modelling (only efac and equad). However, while calling nu.add_noise_to_model, it seems that an ecorr parameter must be added when performing non wide-band timing as in my case (I'm attaching the error).
The error should come from lines 414-418 of https://github.com/nanograv/pint_pal/blob/main/src/pint_pal/noise_utils.py#L251 in which:

if not using_wideband:
            ec_comp.add_param(param = ecorr_params[ii], setup = True)
        else:
            dm_comp.add_param(param = dmefac_params[ii])
            dm_comp.add_param(param = dmequad_params[ii], setup = True)

It could solved by adding the case of non-wide-band toas without writing ecorr parameter in the parfile.

toa.tim.txt

ecorr_issue

Parfile is:
parfile.txt

@rossjjennings
Copy link
Member

This probably results from the fact that PINT Pal was originally developed with a narrow focus on the NANOGrav 15-year data set, where we always used ECORR. Some of us have been using it with IPTA data for Early DR3, but in the IPTA work we've been using a very different noise modeling setup that doesn't use nu.add_noise_to_model(), so we haven't needed to adapt that part of the code to non-NANOGrav data before now. I'll see if I can figure out what needs to be changed to fix this.

@rossjjennings
Copy link
Member

@FrancescoIraci Have you had a chance to test this since the fix was merged? It's not in the PyPI version yet, and won't be until we release the new version, but you can get the latest changes either by cloning this repository and using pip install . from the top-level pint-pal directory, or by running

pip install git+https://github.com/nanograv/pint_pal.git@main

@FrancescoIraci
Copy link
Author

Hi @rossjjennings, I will probably be able to check that next week. Sorry for the delay

@rossjjennings
Copy link
Member

Closing since this should be fixed by #45.

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