Giter Club home page Giter Club logo

Comments (6)

Jammy2211 avatar Jammy2211 commented on July 23, 2024

Are the positions input here:

positions_likelihood = al.PositionsLHPenalty(positions=positions, threshold=1.)

Accurate and robust and something you trust to use for all fits?

from pyautolens.

AstroAaron avatar AstroAaron commented on July 23, 2024

They are good enough within the threshold:
image_with_positions

I am not doing this yet for all fits. This is just for a single velocity bin. Still have to find a way how to automatically determine the positions before the source_lp run for the future datasets to be fitted.

from pyautolens.

Jammy2211 avatar Jammy2211 commented on July 23, 2024

Is there any way to specify all positions manually? The position solver going on behind the scenes is not 100% reliable yet (we're working on fixing this atm) so doing it by hand and getting positions you therefore trust is a good shout (this is what I do).

With these lines of code:

    positions_likelihood=source_lp_results.last.positions_likelihood_from(
        factor=3.0, minimum_threshold=0.2
    ),

You can actually do this if you have positions already:

    positions_likelihood=source_lp_results.last.positions_likelihood_from(
        factor=3.0, minimum_threshold=0.2, positions=positions
    ),

This will use the input positions (e.g. it will skip the position solver) but still update the threshold using these positions.

This is more robust and should fix the bug posted above, so try that :).

No idea whats causing the bug.

from pyautolens.

AstroAaron avatar AstroAaron commented on July 23, 2024

Thank you for the input, I will do it that way then! This also means I will need to look into how to automatically derive the positions for all my datasets for the manual imput. Ideally without needing to image each velocity bin manually.

Another questions, would it be a bad idea to use the positions derived from the continuum image? This would mean that ~2 positions that are manually defined are not corresponding to emission in the current dataset. It would still be valid for the mass model though. Like here with black dots on the right part of the image:
image_with_positions

from pyautolens.

Jammy2211 avatar Jammy2211 commented on July 23, 2024

This also means I will need to look into how to automatically derive the positions for all my datasets for the manual imput.

Can you not just use this GUI or manual input script:

https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/imaging/data_preparation/gui/positions.py
https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/imaging/data_preparation/examples/optional/positions.py

Another questions, would it be a bad idea to use the positions derived from the continuum image? This would mean that ~2 positions that are manually defined are not corresponding to emission in the current dataset. It would still be valid for the mass model though. Like here with black dots on the right part of the image:

I think it would be fine, the line:

    positions_likelihood=source_lp_results.last.positions_likelihood_from(
        factor=3.0, minimum_threshold=0.2, positions=positions
    ),

Is always updating the distance threshold to be 3.0 times the best solution they trace too previously... so even if your positions are not great the threshold will adapt to prevent it from rejecting plausible mass models.

from pyautolens.

AstroAaron avatar AstroAaron commented on July 23, 2024

Can you not just use this GUI or manual input script:
That would mean imaging over 466 individual velocity bins (because I am doing this for several molecular emission lines that are quite broad) and then starting the GUI script/finding the positions for each of them.
I will probably instead write some code that can find the brightest pixel in a restoring beam sized area within some rectangular or more complicated mask and for this to be done automatically for the binned cubes.

I think it would be fine, the line:

    positions_likelihood=source_lp_results.last.positions_likelihood_from(
        factor=3.0, minimum_threshold=0.2, positions=positions
    ),

Is always updating the distance threshold to be 3.0 times the best solution they trace too previously... so even if your positions are not great the threshold will adapt to prevent it from rejecting plausible mass models.

I will try this and see how the solutions looks like. Would love to go that way, fingers crossed.

from pyautolens.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.