def getRawHeadDict(self, raw_head):
    'Intepret the ascii structure of the minicbf image header.'
    i_1 = (28 + raw_head.find('_array_data.header_contents'))
    i_2 = raw_head.find('_array_data.data', i_1)
    i_3 = (raw_head.find('--CIF-BINARY-FORMAT-SECTION--', i_2) + 29)
    i_4 = (i_3 + 500)
    lis = [line[2:].strip().split(' ', 1) for line in raw_head[i_1:i_2].splitlines() if (line and (line[0] == '#'))]
    lis2 = [line[2:].strip().split(': ', 1) for line in raw_head[i_3:i_4].splitlines() if (line and (line[0:2] == 'X-'))]
    self.raw_head_dict = {'Detector_2theta': '0.', 'MESSAGE': ''}
    for val in lis:
        if (val[0] in HEADER_KEYS):
            if (len(val) == 2):
                self.raw_head_dict[val[0]] = val[1]
            else:
                self.raw_head_dict[val[0]] = None
    self.raw_head_dict.update(dict([val for val in lis2 if ('Binary-' in val[0])]))
    self.raw_head_dict.update({'HEADER_SIZE': i_3})
    self.raw_head_dict.update({'DATE': ' '.join(lis[1])})
    return self.raw_head_dict
Intepret the ascii structure of the minicbf image header.
def getRawHeadDict(self, raw_head):
    
    i_1 = (28 + raw_head.find('_array_data.header_contents'))
    i_2 = raw_head.find('_array_data.data', i_1)
    i_3 = (raw_head.find('--CIF-BINARY-FORMAT-SECTION--', i_2) + 29)
    i_4 = (i_3 + 500)
    lis = [line[2:].strip().split(' ', 1) for line in raw_head[i_1:i_2].splitlines() if (line and (line[0] == '#'))]
    lis2 = [line[2:].strip().split(': ', 1) for line in raw_head[i_3:i_4].splitlines() if (line and (line[0:2] == 'X-'))]
    self.raw_head_dict = {'Detector_2theta': '0.', 'MESSAGE': }
    for val in lis:
        if (val[0] in HEADER_KEYS):
            if (len(val) == 2):
                self.raw_head_dict[val[0]] = val[1]
            else:
                self.raw_head_dict[val[0]] = None
    self.raw_head_dict.update(dict([val for val in lis2 if ('Binary-' in val[0])]))
    self.raw_head_dict.update({'HEADER_SIZE': i_3})
    self.raw_head_dict.update({'DATE': ' '.join(lis[1])})
    return self.raw_head_dict