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

Predicting from polynomial fit to frequency axis #171

Open
landmanbester opened this issue Oct 20, 2016 · 8 comments
Open

Predicting from polynomial fit to frequency axis #171

landmanbester opened this issue Oct 20, 2016 · 8 comments

Comments

@landmanbester
Copy link

Currently montblanc uses a spectral index model for the frequency axis

I(v) = I(v0)(v/v0)^alpha

In some cases it is preferable to fit a more flexible model. In particular it is not possible to fit in log space when there are negative pixels in the model. In such cases we can still fit a polynomial

I(v) = I_0 + I_1(v/v0) + I_2(v/v0)**2 + ....

to the frequency axis. Alternatively we might want to fit a polynomial in log space

log(I(v)) = I_0 + alpha log(v/v0) + beta log(v/v0)**2 + ....

Can we have a feature which allows montblanc to predict from these models? This is especially relevant for incorporating montblanc into DDFacet.

@landmanbester
Copy link
Author

This is also relevant to #169

@landmanbester
Copy link
Author

Just documenting discussion with @sjperkins. We usually want to fit the polynomial in log space for Stokes I and just an ordinary polynomial for Q, U and V. Thus sensible default behaviour would be to use a log-polynomial for I and ordinary polynomial for the rest. There are however cases where we want to allow for negative flux (as is the case when predicting from a DDFacet sky model for example) so we should be able to toggle log-polynomial on or off depending on the use case.

@sjperkins
Copy link
Member

The alpha input with shape schema ['nsrc', 'ntime'] would then be renamed to spectral_components and it's shape changed something like ['nsrc','ntime','nspeccomps','nstokes'].

@o-smirnov Is the variation by time necessary -- The original idea was to represent scintillation in the stokes parameters, but I've never been sure if it's necessary in the spectral index expression.

@rdeane
Copy link

rdeane commented Nov 14, 2017 via email

@bennahugo
Copy link
Contributor

I second @landmanbester's request to do polynomial fitting for I. It is necessary if you're working off pixelated models that could contain negatives - if a source falls between pixels it is necessary to to describe it as some sort of sinc function in pixel space.

I also agree that the log expansion needs more terms - some sources are peaked within the observed spectrum and have strong curavature (1934-638 is one such case for instance).

Moreover it is not just one polynomial to describe Q and U behaviour in frequency. There are two taylor expansions needed to describe how the polarization angle varies with frequency and another how fractional polarization varies with frequency. In the a first order these are the polarization angle and polarization fraction at the reference frequency. See also documentation of SetJy here: https://casa.nrao.edu/docs/taskref/setjy-task.html

@sjperkins
Copy link
Member

@landmanbester @bennahugo Am I correct in understanding that these expressions are applied to the stokes parameters prior to the construction of the brightness matrix?

@bennahugo
Copy link
Contributor

Yes they make I, Q and U frequency dependent. So the brightness matrix becomes frequency dependent.

@sjperkins
Copy link
Member

I'll work this into the dask version

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

No branches or pull requests

4 participants