def __init__(self, stack={}, energy_max=<NUM_LIT:1>, energy_min=<NUM_LIT>, energy_step=<NUM_LIT>, database='<STR_LIT>'):
if database not in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(database))<EOL><DEDENT>self.database = database<EOL>self.__element_metadata = {}<EOL>if energy_min < self.e_min:<EOL><INDENT>raise ValueError("<STR_LIT>".format(self.e_min))<EOL><DEDENT>self.energy_min = energy_min<EOL>if energy_max > self.e_max:<EOL><INDENT>raise ValueError("<STR_LIT>".format(self.e_max))<EOL><DEDENT>self.energy_max = energy_max<EOL>if energy_min == energy_max:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if (energy_max - energy_min) < energy_step:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>self.energy_step = energy_step<EOL>if not stack == {}:<EOL><INDENT>_utilities.checking_stack(stack=stack, database=self.database)<EOL>new_stack = self.__update_stack_with_isotopes_infos(stack=stack)<EOL>self.stack = new_stack<EOL>self.__lock_density_if_defined(stack=self.stack)<EOL>self.__math_on_stack()<EOL><DEDENT>
initialize resonance object

        :param stack: dictionary to store sample info

              example: {'layer1': {'elements':['Ag','Si],
                                   'atomic_ratio': [1, 2],
                                   'thickness': {'value': 0.025,
                                                 'units': 'mm',
                                                 },
                                   'density': {'units': 'g/cm3',
                                               'value': 0.5,
                                               },
                                    }
        :type stack: dictionary

        :param energy_max: (default 300) max energy in eV to use in calculation
        :type energy_max: float

        :param energy_min: (default 0) min energy in eV to use in calculation
        :type energy_min: float

        :param energy_step: (default 0.1) energy step to use in extrapolation of sigma data
        :type energy_step: float

        :param database: database to extract cross-section info. ['ENDF_VII', 'ENDF_VIII']
        :type database: str