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

New "mask" to mark some pixels as "already modelled" #174

Open
fabiobg83 opened this issue Jun 3, 2015 · 4 comments
Open

New "mask" to mark some pixels as "already modelled" #174

fabiobg83 opened this issue Jun 3, 2015 · 4 comments
Labels

Comments

@fabiobg83
Copy link
Contributor

I think that it could be useful to give Lensed the information that some pixels should not be modelled, without actually masking them. When you mask a pixel you have actually no control on it, i.e. any flux can end up there. Instead, there are cases where some pixels are less interesting because they have already been modelled or because they belong to different sources with respect to the one you are studying. In this case, it would be plausible to make the model start from the observed pixel value, so that any addition of flux there is discouraged. It may not be theoretically very precise, but it could be effective in some practical cases. I don't know if it is indeed possible.

@fabiobg83 fabiobg83 added the idea label Jun 3, 2015
@fabiobg83
Copy link
Contributor Author

@ntessore just told me that there could be problems with the "sky" component which is automatically applied to all pixels.

@ntessore
Copy link
Member

ntessore commented Jun 3, 2015

Indeed, it would be problematic because these pixels already contain all foreground sources such as the sky etc., but then it would be possible to simply not apply any foreground sources to them.

In practice, I think it would be enough for these "copied" pixels to have their initial value set to the pixel value from the image, and those which should be calculated to some magic value. In pseudo-code:

// flux for pixel
float f = initial_values[i];

// check if foreground flux should be calculated
if(f == -HUGE_VALF)
{
    // calculate flux from foregrounds
    // ...
}

// lens and calculate background sources as usual
// ...

We would have to see if that negatively affects the performance, but I think it's an easy implementation.

@rbmetcalf
Copy link
Member

I am not sure I understand what is wanted here. Doesn't simply fixed the sources that have
already been fit and then adding another effectively do the same thing?

@fabiobg83
Copy link
Contributor Author

Let's say I have a lens with two sets of multiple images (that is, two background sources). I may would like to see the constraints on the lens independently for each set. But even if I first fit only one of the two (say, the most luminous), there is no way I can fix it when I want to use only the other one, because the best parameters for the source will change depending on the lens.

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

No branches or pull requests

3 participants