brandondube / dygdug

1 stars 5 forks source link

Too many simultaneously provided input parameters #4

Open brandondube opened 2 years ago

brandondube commented 2 years ago

The definition for the simple Lyot coronagraph is:

class LyotCoronagraphSingleDM:
    def __init__(self, Nmodel, Npup, Nlyot, Nfpm, Nimg, Dpup, fpm_oversampling, image_oversampling, rFPM, wvl0, fno, data_root, ifn_fn, iwa, owa, start_az, end_az):

which is 16 or so parameters given at once. This is too many for users to not fry their brains. Without thinking too hard, this can be divided in 3 or 4 by breaking up the specification for the pupil, FPM, lyot stop, and final image. Then the definition of a Lyot coronagraph might look like:

class LyotCoronagraphSingleDM:
    def __init__(self, input_pupil, fpm, lyot_stop, final_image):

This seems much simpler, and the various chunks are like legos that can be reused in other coronagraph models

Point designs are great for facilitating discussion, but let's discuss more thoroughly before "finishing" any particular implementation