def _read_iop_from_file(self, file_name):
lg.info('<STR_LIT>' + file_name + '<STR_LIT>' + str(self.wavelengths))<EOL>if os.path.isfile(file_name):<EOL><INDENT>iop_reader = csv.reader(open(file_name), delimiter='<STR_LIT:U+002C>', quotechar='<STR_LIT:">')<EOL>wave = iop_reader.next()<EOL>iop = iop_reader.next()<EOL><DEDENT>else:<EOL><INDENT>lg.exception('<STR_LIT>' + file_name)<EOL>raise IOError<EOL><DEDENT>try:<EOL><INDENT>wave = map(float, wave)<EOL>iop = map(float, iop)<EOL>return scipy.interp(self.wavelengths, wave, iop)<EOL><DEDENT>except IOError:<EOL><INDENT>lg.exception('<STR_LIT>')<EOL>return -<NUM_LIT:1><EOL><DEDENT>
Generic IOP reader that interpolates the iop to the common wavelengths defined in the constructor

:param file_name: filename and path of the csv file
:returns interpolated iop