Giter Site home page Giter Site logo

Comments (9)

beckermr avatar beckermr commented on August 27, 2024

From @esheldon:

under region=="weight" you have

wt_us = wt

seems a bit misleading, maybe that should be None?

from ngmixer.

beckermr avatar beckermr commented on August 27, 2024

Note the previous is in simpsimmedsio.py

from ngmixer.

esheldon avatar esheldon commented on August 27, 2024

Also monkey patching can be problematic

from ngmixer.

esheldon avatar esheldon commented on August 27, 2024

In simpsimmedsio

_get_band_observation(..):
...
obs.weight_us = wt_us

The above is what I mean by monkey patching

from ngmixer.

beckermr avatar beckermr commented on August 27, 2024

Yeah totally agree. Just hacking things up so it runs for now. Def need to clean up when the whole thing gets refactored.

from ngmixer.

esheldon avatar esheldon commented on August 27, 2024

Design-wise, not sure if it makes sense to add set_usweight() etc. though. Maybe this belongs in the meta dictionary, which is explicitly a grab-bag?

from ngmixer.

beckermr avatar beckermr commented on August 27, 2024

Right. So in terms of design, the reason that I am mucking with the weights in the first place is because the MOF expects two weights. The first is for the initial iteration of the fitting and the second is for the subsequent ones. This happens to be uberseg, but actually a more general interface to the MOF should be provided. Something like initial_weight and iter_weight or whatever.

from ngmixer.

esheldon avatar esheldon commented on August 27, 2024

Maybe a new datastructure is needed, designed for MOF.

This could either take an Observation/Obslist/ etc. on construction or inherit from one of those.

With a new data type you can apply constraints/requirements to make sure you have what you want without resorting to monkey patching Observations.

from ngmixer.

beckermr avatar beckermr commented on August 27, 2024

closing this in favor of #25

from ngmixer.

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.