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

Interface for frequency and time dependent models #65

Open
ptiede opened this issue Sep 25, 2024 · 0 comments
Open

Interface for frequency and time dependent models #65

ptiede opened this issue Sep 25, 2024 · 0 comments

Comments

@ptiede
Copy link
Member

ptiede commented Sep 25, 2024

Given that #29 has landed, we can add better multifrequency support for models. We will not take a wrapper approach since unwrapping every multifrequency model would be very difficult. Instead, the current plan is to tag the parameters passed to the model themselves.

A spectral index model could look something like

struct SpectralIndex{T, F}
      specindx::T
      ref_freq::F
end

function build_params(model::TaylorSpectral, refparam, Ti, Fr)
       param = refparam*(Fr/model.ref_freq)^model.specindex
       return param
end

struct MultiDomainParam{Fr, Ti, P}
      freqmodel::Fr
      timemodel::Ti
      param::P
end

modify(Gaussian(), Stretch(MultiDomainParam(2.0, SpectralIndex(1.0, 230e9), Constant()))
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

1 participant