Skip to content

Conversation

@abhisrkckl
Copy link
Contributor

@abhisrkckl abhisrkckl commented Jul 9, 2025

Exponential dip model for things like profile change events.

This is different from the tempo2 implementation. In the tempo2 implementation, the exponential is multiplied by a Heaviside step function to construct the dip. This function is discontinuous at the event epoch and is hence not differentiable there. This will be a problem if the event epoch coincides with a TOA. Also, the design matrix becomes degenerate in that case.

Here, I have replaced the step function with a logistic function of a non-zero timescale. The explicit delay expression and its partial derivatives are given below. This function is normalized such that the amplitude A is the extremum value of the dip delay. Note that the extremum occurs at a time sliglthy after the event epoch.

image (typos: tau -> tau_i, dt -> t-T_i)

The logistic function timescale is given by the epsilon parameter (EXPDIPEPS). It should be set to a value much less than the event decay timescale (e.g., fraction of a day), and is not a fittable parameter.

This will not work for the 2021 event of J1713+0747 since its chromatic behavior is not well-modeled by a powerlaw in observing frequency.

@abhisrkckl abhisrkckl changed the title Chromatic exponential dip WIP: Chromatic exponential dip Jul 9, 2025
@abhisrkckl
Copy link
Contributor Author

image

@abhisrkckl
Copy link
Contributor Author

Since we need to fit for t0 also, we can't use the Heaviside theta function; it is not differentiable at 0. I am trying using the logistic function which tends to the Heaviside theta function in the appropriate limit.

@abhisrkckl
Copy link
Contributor Author

abhisrkckl commented Jul 12, 2025

Par file example:

RAJ            05:00:00                     1
DECJ           15:00:00                     1
POSEPOCH       55000
F0             100                          1
F1             -1e-15                       1
PEPOCH         55000
EXPDIPEP_1     54764.272428904194001        1      
EXPDIPAMP_1    1.6641670367524487e-06       1
EXPDIPTAU_1    112.00425959054773           1
EXPDIPIDX_1    -1.9148109887274356          1
EXPDIPEPS      0.01
TZRMJD         55000
TZRSITE        pks
TZRFRQ         1400
EPHEM          DE440
CLOCK          TT(BIPM2019)
UNITS          TDB

@abhisrkckl abhisrkckl changed the title WIP: Chromatic exponential dip Chromatic exponential dip Jul 12, 2025
@abhisrkckl
Copy link
Contributor Author

@jeremy-baier Please take a look.

@abhisrkckl abhisrkckl added the awaiting review This PR needs someone to review it so it can be merged label Jul 12, 2025
@jeremy-baier
Copy link
Contributor

this is awesome, @abhisrkckl .
to clarify, if the user sets epsilon to a very small value, this function converges to the heavy-side implementation in Tempo2 and enterprise extensions? i have been playing around with this and it seems like the parameters match up very well.
I typed up an achromatic very of this in desmos in case anyone else wants to play around with a comparison of @abhisrkckl ’s implementation vs the tempo2/enterprise extensions version. https://www.desmos.com/calculator/87yxg3muod

@jeremy-baier
Copy link
Contributor

could epsilon be hardcoded to some small number to avoid user error? or perhaps a warning is appropriate if epislon is above some value.

@abhisrkckl
Copy link
Contributor Author

abhisrkckl commented Jul 15, 2025

to clarify, if the user sets epsilon to a very small value, this function converges to the heavy-side implementation in Tempo2 and enterprise extensions? i have been playing around with this and it seems like the parameters match up very well.

could epsilon be hardcoded to some small number to avoid user error? or perhaps a warning is appropriate if epislon is above some value.

As epsilon approaches 0, this approaches the tempo2 version. In practice, this means something much less than the decay timescale. I have checked that 0.001 day works well, and I have included this as the default value. If the user doesn't provide EXPDIPEPS in the par file, this default will be used.

@jeremy-baier
Copy link
Contributor

yea, this looks great.
why specifically is it important to be differentiable in time rather than just differentiable w.r.t. the timing model parameters?

@abhisrkckl
Copy link
Contributor Author

I meant differentiable in T. Since it appears as (t-T), differentiable in time == differentiable in T.

@dlakaplan
Copy link
Contributor

What does the tempo2 par file look like? Are the shared parameters the same?

@dlakaplan
Copy link
Contributor

I think the tempo2 model was implemented in mattpitkin/tempo2@2edd0bf

@abhisrkckl
Copy link
Contributor Author

What does the tempo2 par file look like? Are the shared parameters the same?


EXPEP_1        54764.272428904194001       
EXPEP_2        57500.886666587524999       
EXPPH_1        1.6641670367524487e-06      
EXPPH_2        2.1964077367938582999e-06   
EXPTAU_1       112.00425959054773          
EXPTAU_2       26.57155879530331           
EXPINDEX_1     -1.9148109887274356         
EXPINDEX_2     -1.5060816448307765999

@abhisrkckl
Copy link
Contributor Author

I have added the documentation and set up the parameter aliases such that tempo2 par files are now readable.

@abhisrkckl abhisrkckl requested a review from dlakaplan August 8, 2025 12:58
@dlakaplan
Copy link
Contributor

This looks good to me. @scottransom : any comments or should we merge?

@scottransom
Copy link
Member

Looks good to me, too! Nice job!

@dlakaplan dlakaplan merged commit 79c6b16 into nanograv:master Aug 12, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review This PR needs someone to review it so it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add chromatic dips (eg for J1713+0747) as a deterministic delay Chromatic delay models

4 participants