libplanarradpy/planrad.py
def write_phase_params_to_file(self):
        """Write the params to file that surftool_Free needs to generate the surface facets"""
        inp_file = os.path.join(os.path.join(self.input_path, 'phase_files'), self.phase_function_file) + '_params.txt'
        lg.info('Writing Inputs to file : ' + inp_file)

        if self.iop_type == 'isotropic' or 'isotropic_integ' or 'petzold' or 'pure_water ':
            lg.info('Iop type is :: ' + self.iop_type)

            f = open(inp_file, 'w')

            f.write('verbose = ' + str(self.verbose) + '\n')
            f.write('band_count = ' + str(self.num_bands) + '\n')
            f.write('band_centres_data = ')
            f.write(",".join([str(wave) for wave in self.wavelengths]) + '\n')
            f.write('partition = ' + self.partition + '\n')
            f.write('vn = ' + str(self.vn) + '\n')
            f.write('hn = ' + str(self.hn) + '\n')
            f.write('theta_points = ')
            f.write(",".join([str(theta) for theta in self.theta_points]) + '\n')
            f.write('type = ' + self.iop_type + '\n')
            f.write('phase_func_save_fp = ' + inp_file.strip('_params.txt') + '\n')
            f.flush()
            f.close()
def write_phase_params_to_file(self):
        """Write the params to file that surftool_Free needs to generate the surface facets"""
        inp_file = os.path.join(os.path.join(self.input_path, 'phase_files'), self.phase_function_file) + '_params.txt'
        lg.info('Writing Inputs to file : ' + inp_file)

        if self.iop_type == 'isotropic' or 'isotropic_integ' or 'petzold' or 'pure_water ':
            lg.info('Iop type is :: ' + self.iop_type)

            f = open(inp_file, 'w')

            f.write('verbose = ' + str(self.verbose) + '\n')
            f.write('band_count = ' + str(self.num_bands) + '\n')
            f.write('band_centres_data = ')
            f.write(",".join([str(wave) for wave in self.wavelengths]) + '\n')
            f.write('partition = ' + self.partition + '\n')
            f.write('vn = ' + str(self.vn) + '\n')
            f.write('hn = ' + str(self.hn) + '\n')
            f.write('theta_points = ')
            f.write(",".join([str(theta) for theta in self.theta_points]) + '\n')
            f.write('type = ' + self.iop_type + '\n')
            f.write('phase_func_save_fp = ' + inp_file.strip('_params.txt') + '\n')
            f.flush()
            f.close()
def write_phase_params_to_file ( self ) : inp_file = os . path . join ( os . path . join ( self . input_path , 'phase_files' ) , self . phase_function_file ) + '_params.txt' lg . info ( 'Writing Inputs to file : ' + inp_file ) if self . iop_type == 'isotropic' or 'isotropic_integ' or 'petzold' or 'pure_water ' : lg . info ( 'Iop type is :: ' + self . iop_type ) f = open ( inp_file , 'w' ) f . write ( 'verbose = ' + str ( self . verbose ) + '\n' ) f . write ( 'band_count = ' + str ( self . num_bands ) + '\n' ) f . write ( 'band_centres_data = ' ) f . write ( "," . join ( [ str ( wave ) for wave in self . wavelengths ] ) + '\n' ) f . write ( 'partition = ' + self . partition + '\n' ) f . write ( 'vn = ' + str ( self . vn ) + '\n' ) f . write ( 'hn = ' + str ( self . hn ) + '\n' ) f . write ( 'theta_points = ' ) f . write ( "," . join ( [ str ( theta ) for theta in self . theta_points ] ) + '\n' ) f . write ( 'type = ' + self . iop_type + '\n' ) f . write ( 'phase_func_save_fp = ' + inp_file . strip ( '_params.txt' ) + '\n' ) f . flush ( ) f . close ( )
Write the params to file that surftool_Free needs to generate the surface facets
Write the params to file that surftool_Free needs to generate the surface facets