dylancromer / maszcal

Mass calibrations for thermal-SZ clusters
1 stars 3 forks source link

Refactor params setting [baryons branch] #26

Closed dylancromer closed 5 years ago

dylancromer commented 5 years ago

The way params are set is kind of messy. We need a clean consistent way of setting the params for a StackedModel instance so that you can choose to use baryons but no miscentering, for example. Options include some kind of dictionary.

dylancromer commented 5 years ago

Due to the way params are generated (Latin hypercubes) it may be better to leave the params variable as a simple ndarray.

Instead could use a separate variable param_columns, a list of strings e.g. ['concentrations', 'a_sz'], to indicate which parameters are in use.

This is made problematic by the fact that not any combination of parameters is usable (i.e. you must specify 2 miscentering parameters, you can't just provide one of them).

Another option is a flag for each type of correction (miscentering, baryons), and then some canonical shape [i.e. if you have no corrections, shape is (con, a_sz). If you have miscentering, (con, a_sz, cen_frac, misc_len). If you have baryons, (con, a_sz, baryon_param). If you have baryons AND miscentering, (con, a_sz, cen_frac, misc_len, baryon_param), etc]. This is a bit more confusing in some respects but less in others.