def __init__(self, d=[], rho=[], sigma=[], comp=[], elem_z=[], theta=[], params={}): """ Parameters: ----------- All these should be num arrays, dtype = double * d array of layer thicknesses (angstroms) * rho array of corresponding densities (g/cm^3) * sigma array of interface roughnesses (angstroms) * comp is the composition array * elem_z are the Z values of each element in the model * theta array of theta values (degrees) * params is a dictionary of model parameters (see set_params) """ self.iff = Ifeffit(screen_echo=0) self.nlayer = 0 self.nelem = 0 self.nthet = 0 self.fp = [] self.fpp = [] self.amu = [] self.mu_at = [] self._init_params() # some flags self._init_en = True self._init_fy = True self._init_carr = True self._init_ptr = True # init self.init_model(d=d, rho=rho, sigma=sigma, comp=comp, elem_z=elem_z, theta=theta) self.set_params(**params)