def ID_from_data(self, ID_field='$SRC'):
        '''
        Returns the well ID from the src keyword in the FCS file. (e.g., A2)
        This keyword may not appear in FCS files generated by other machines,
        in which case this function will raise an exception.
        '''
        try:
            return self.get_meta_fields(ID_field)[ID_field]
        except KeyError:
            msg = "The keyword '{}' does not exist in the following FCS file: {}"
            msg = msg.format(ID_field, self.datafile)
            raise Exception(msg)
def ID_from_data ( self , ID_field = '$SRC' ) : try : return self . get_meta_fields ( ID_field ) [ ID_field ] except KeyError : msg = "The keyword '{}' does not exist in the following FCS file: {}" msg = msg . format ( ID_field , self . datafile ) raise Exception ( msg )
Returns the well ID from the src keyword in the FCS file. (e.g., A2)
        This keyword may not appear in FCS files generated by other machines,
        in which case this function will raise an exception.