We have implementations of BinaryModelCartesian and BinaryModelAngular, but we want to start introducing a very rich vocabulary of resolved star and disk models, and then we want to be able to combine these like Lego to build expressive models of complex scenes. Let's call this a System which might contain multiple individual sources.
I think we should have a dpg.Source class that inherits from zdx.Base with some of the following features:
[ ] self.coords (see Issue #15)
[ ] self.contrast and self.flux (see Issue #15)
[ ] a phase centre in x y
[ ] __add__ and __mul__ methods, such that:
if you write model = model_1 + 0.1 * model_2, it returns a System which will correctly normalize the fluxes to sum to 1
therefore @shashankdholakia and I think that the right way to do this is if __mul__ returns a System object regardless of what Source type went in, and this has a silentself.frac attribute
if you multiply by a scalar it scales the whole thing, but if you multiply by a vector of the same shape as the self.wavels then it gives you weighting according to a spectrum
__add__ then returns a System(a, b) where a and b are asserted to by System objects
[ ] At runtime, system.model(u,v,wavel) returns jnp.sum([model.frac * model.model(u, v, wavel) for model in self.models],axis=appropriate)
It is not clear to me how in all contexts these models should interact with gridsearch code; it may be that you basically have to do this manually, as they will in general be bespoke solutions.
We have implementations of
BinaryModelCartesian
andBinaryModelAngular
, but we want to start introducing a very rich vocabulary of resolved star and disk models, and then we want to be able to combine these like Lego to build expressive models of complex scenes. Let's call this aSystem
which might contain multiple individual sources.I think we should have a
dpg.Source
class that inherits fromzdx.Base
with some of the following features:self.coords
(see Issue #15)self.contrast
andself.flux
(see Issue #15)__add__
and__mul__
methods, such that:model = model_1 + 0.1 * model_2
, it returns aSystem
which will correctly normalize the fluxes to sum to 1__mul__
returns aSystem
object regardless of whatSource
type went in, and this has a silentself.frac
attributeself.wavels
then it gives you weighting according to a spectrum__add__
then returns aSystem(a, b)
wherea
andb
are asserted to bySystem
objectssystem.model(u,v,wavel)
returnsjnp.sum([model.frac * model.model(u, v, wavel) for model in self.models],axis=appropriate)
It is not clear to me how in all contexts these models should interact with gridsearch code; it may be that you basically have to do this manually, as they will in general be bespoke solutions.