Fitting Models with a random subset: clunky syntax

Bug #1214047 reported by Jerome Fung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HoloPy
Fix Committed
Low
Unassigned

Bug Description

Specifying a Model to fit to a random subset of a hologram currently requires passing an ImageSchema to the schema_overlay kwarg in the Model constructor:

 model = Model(par_s, Mie.calc_holo,
                  schema_overlay = ImageSchema(use_random_fraction = 0.02,
                                               origin = tgt_small.origin),
                  alpha = par(0.75))

(see lines 47--50 of the attached script).

This is both clunky (consider a use_random_fraction kwarg to the Model constructor), and also requires re-specifying the origin if we're fitting to a subimaged target hologram.

Related branches

Revision history for this message
Jerome Fung (fung) wrote :
Tom Dimiduk (tdimiduk)
Changed in holopy:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.