Esempio n. 1
0
    def __init__(self,
                 datnum,
                 run_fit,
                 experiment_name,
                 hot_or_cold,
                 vary_theta, vary_gamma,
                 g, theta, mid, amp, lin, const, occ_lin,
                 ):
        super().__init__()
        self.run_fit = triggered_by(self.components.but_fit.id)  # Don't actually care about n_clicks from run_fit
        self.datnum_triggered = triggered_by(self.components.inp_datnum.id)

        self.experiment_name = experiment_name if experiment_name else None
        self.datnum = datnum
        self.hot_or_cold = hot_or_cold

        self.vary_theta = True if vary_theta is not None and True in vary_theta else False
        self.vary_gamma = True if vary_gamma is not None and True in vary_gamma else False
        self.mid = mid
        self.g = 10 ** g
        self.theta = theta
        self.amp = amp
        self.lin = lin
        self.const = const
        self.occ_lin = occ_lin
Esempio n. 2
0
    def __init__(
        self,
        run,
        run_centers,
        datnum,
        overwrite_centers,
        sp_start,
        se_transition_func,
        se_fit_width,
        se_rows,
        use_tonly,
        tonly_datnum,
        tonly_func,
        tonly_width,
        tonly_rows,
        center_func,
        force_theta,
        force_gamma,
        force_dt,
        force_amp,
        int_from_se,
        use_csq,
        csq_datnum,
    ):
        self.run = triggered_by(
            self.components.but_run.id)  # i.e. True if run was the trigger
        self.run_centers = triggered_by(
            self.components.but_run_generate_centers.id)
        self.overwrite_centers = True if overwrite_centers else False
        self.datnum = datnum

        # SE fitting
        self.sp_start = sp_start if sp_start else 0.0
        self.ent_transition_func = se_transition_func
        self.ent_width = se_fit_width
        self.ent_rows = se_rows if se_rows else (None, None)

        # Tonly fitting
        self.use_tonly = use_tonly
        self.tonly_datnum = tonly_datnum
        self.tonly_func = tonly_func
        self.tonly_width = tonly_width
        self.tonly_rows = tonly_rows

        self.center_func = center_func
        self.force_theta = force_theta
        self.force_gamma = force_gamma

        # Integration info
        self.force_dt = force_dt
        self.force_amp = force_amp
        self.int_from_se = int_from_se

        # CSQ mapping
        self.csq_map = use_csq
        self.csq_datnum = csq_datnum

        # ## Post init
        self.dat = get_dat(self.datnum) if self.datnum else None
Esempio n. 3
0
    def __init__(self, se_name, e_names, t_names, int_names, calculated,
                 datnum):
        super().__init__()  # Shutting up PyCharm
        self.se_name: str = se_name
        self.e_names: List[str] = listify_dash_input(e_names)
        self.t_names: List[str] = listify_dash_input(t_names)
        self.int_names: List[str] = listify_dash_input(int_names)
        self.datnum: Optional[int] = datnum

        self.calculated: StoreData = calculated
        self.calculated_triggered = triggered_by(
            self.components.store_calculated.id)

        # Generated
        self.dat = get_dat(datnum) if self.datnum is not None else None
Esempio n. 4
0
    def __init__(
        self,
        datnum,
        t_fit_names,  # plotting existing
        calculated,
    ):
        self.datnum: int = datnum
        # plotting existing
        self.t_fit_names: List[str] = listify_dash_input(t_fit_names)

        self.calculated: StoreData = calculated
        self.calculated_triggered = triggered_by(
            self.components.store_calculated.id)

        # ################# Post calculations
        self.dat = get_dat(self.datnum) if self.datnum is not None else None
Esempio n. 5
0
    def __init__(self,
                 which, x_type,
                 datnum,
                 g, theta, mid, amp, lin, const, occ_lin,
                 experiment_name,
                 ):
        super().__init__()  # Just here to shut up PyCharm
        self.experiment_name = experiment_name if experiment_name else None
        self.which = ensure_list(which if which else ['occupation'])
        self.x_type = x_type
        self.which_triggered = triggered_by(self.components.dd_which_nrg.id)

        self.datnum = datnum
        self.mid = mid
        self.g = 10 ** g
        self.theta = theta
        self.amp = amp
        self.lin = lin
        self.const = const
        self.occ_lin = occ_lin