************* Module raxisimage
W: 73,0: TODO: It would be useful to have an automatic endianness test in here.
C: 30,0:raxisimage: Invalid name "raxisimage" (should match [A-Z_][a-zA-Z0-9]+$)
C: 49,8:raxisimage.__init__: Invalid name "m" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
C: 56,8:raxisimage.swap_needed: Operator not preceded by a space
        endian=self.endianness
              ^
C: 77,8:raxisimage._readheader: Operator not preceded by a space
        endianness=self.endianness
                  ^
C: 79,8:raxisimage._readheader: Operator not preceded by a space
        RKey,orderList=self.rigakuKeys()
                      ^
C: 79,8:raxisimage._readheader: Invalid name "RKey" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
C: 84,8:raxisimage._readheader: Operator not preceded by a space
        fs=endianness
          ^
C: 84,8:raxisimage._readheader: Invalid name "fs" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
C: 85,8:raxisimage._readheader: Operator not preceded by a space
        minHeaderLength=1400 #from rigaku's def
                       ^
C: 91,8:raxisimage._readheader: Operator not preceded by a space
        rawHead=infile.read(minHeaderLength)
               ^
C: 94,8:raxisimage._readheader: Operator not preceded by a space
        self.header=dict()
                   ^
C: 95,8:raxisimage._readheader: Operator not preceded by a space
        curByte=0
               ^
C: 97,12:raxisimage._readheader: Comma not followed by a space
            if isinstance(RKey[key],int):
                                   ^^
C:100,16:raxisimage._readheader: Operator not preceded by a space
                if RKey[key]==-1:
                            ^^
C:101,20:raxisimage._readheader: Operator not preceded by a space
                    rByte=len(rawHead)-curByte
                         ^
C:102,20:raxisimage._readheader: Operator not preceded by a space
                    self.header[key]=struct.unpack(fs + str(rByte) + 's',
                                    ^
                            rawHead[curByte : curByte + rByte])[0]
C:104,20:raxisimage._readheader: Operator not preceded by a space
                    curByte+=rByte
                           ^^
C:107,16:raxisimage._readheader: Operator not preceded by a space
                rByte=RKey[key]
                     ^
C:108,16:raxisimage._readheader: Operator not preceded by a space
                self.header[key]=struct.unpack(fs + str(rByte) + 's',
                                ^
                        rawHead[curByte : curByte + rByte])[0]
C:110,16:raxisimage._readheader: Operator not preceded by a space
                curByte+=rByte
                       ^^
C:111,17:raxisimage._readheader: Operator not preceded by a space
            elif RKey[key]=='float':
                          ^^
C:113,16:raxisimage._readheader: Operator not preceded by a space
                rByte=4
                     ^
C:114,16:raxisimage._readheader: Operator not preceded by a space
                self.header[key]=struct.unpack(fs + 'f',
                                ^
                        rawHead[curByte : curByte + rByte])[0]
C:116,16:raxisimage._readheader: Operator not preceded by a space
                curByte+=rByte
                       ^^
C:117,17:raxisimage._readheader: Operator not preceded by a space
            elif RKey[key]=='long':
                          ^^
C:119,16:raxisimage._readheader: Operator not preceded by a space
                rByte=4
                     ^
C:120,16:raxisimage._readheader: Operator not preceded by a space
                self.header[key]=struct.unpack(fs + 'l',
                                ^
                        rawHead[curByte : curByte + rByte])[0]
C:122,16:raxisimage._readheader: Operator not preceded by a space
                curByte+=rByte
                       ^^
E:125,32:raxisimage._readheader: Undefined variable 'Rkey'
C:137,8:raxisimage.read: Operator not preceded by a space
        endianness=self.endianness
                  ^
C:140,8:raxisimage.read: Operator not preceded by a space
        offset=-1 #read from EOF backward
              ^
W:163,16:raxisimage.read: Specify string format arguments as logging function parameters
W:165,16:raxisimage.read: Specify string format arguments as logging function parameters
C:172,8:raxisimage.read: Invalid name "di" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
C:182,12:raxisimage.read: Invalid name "sf" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
W:137,8:raxisimage.read: Unused variable 'endianness'
C:190,4:raxisimage.rigakuKeys: Missing docstring
C:192,8:raxisimage.rigakuKeys: Operator not preceded by a space
        RKey={
            ^
                'InstrumentType':10,
                'Version':10,
                'Crystal Name':20,
                'Crystal System':12,
                'A':'float',
                'B':'float',
                'C':'float',
                'Alpha':'float',
                'Beta':'float',
                'Gamma':'float',
                'Space Group':12,
                'Mosaicity':'float',
                'Memo':80,
                'Date':12,
                'Reserved Space 1':84,
                'User':20,
                'Xray Target':4,
                'Wavelength':'float',
                'Monochromator':20,
                'Monochromator 2theta':'float',
                'Collimator':20,
                'Filter':4,
                'Crystal-to-detector Distance':'float',
                'Generator Voltage':'float',
                'Generator Current':'float',
                'Focus':12,
                'Xray Memo':80,
                'IP shape':'long', #1= cylindrical, 0=flat. A "long" is overkill.
                'Oscillation Type':'float', #1=weissenberg. else regular. "float"? really?
                'Reserved Space 2':56,
                'Crystal Mount (spindle axis)':4,
                'Crystal Mount (beam axis)':4,
                'Phi Datum':'float', #degrees
                'Phi Oscillation Start':'float', #deg
                'Phi Oscillation Stop':'float',  #deg
                'Frame Number':'long',
                'Exposure Time':'float', #minutes
                'Direct beam X position':'float', #special, x,y
                'Direct beam Y position':'float', #special, x,y
                'Omega Angle':'float', #omega angle
                'Chi Angle':'float', #omega angle
                '2Theta Angle':'float', #omega angle
                'Mu Angle':'float', #omega angle
                'Image Template':204, #used for storing scan template..
                'X Pixels':'long',
                'Y Pixels':'long',
                'X Pixel Length':'float', #mm
                'Y Pixel Length':'float', #mm
                'Record Length':'long',
                'Total':'long',
                'Starting Line':'long',
                'IP Number':'long',
                'Photomultiplier Ratio':'float',
                'Fade Time (to start of read)':'float',
                'Fade Time (to end of read)':'float', #good that they thought of this, but is it applied?
                'Host Type/Endian':10,
                'IP Type':10,
                'Horizontal Scan':'long', #0=left->Right, 1=Rigth->Left
                'Vertical Scan':'long', #0=down->up, 1=up->down
                'Front/Back Scan':'long', #0=front, 1=back
                'Pixel Shift (RAXIS V)':'float',
                'Even/Odd Intensity Ratio (RAXIS V)':'float',
                'Magic number':'long', #'RAPID'-specific
                'Number of Axes':'long',
                'Goniometer Vector ax.1.1':'float',
                'Goniometer Vector ax.1.2':'float',
                'Goniometer Vector ax.1.3':'float',
                'Goniometer Vector ax.2.1':'float',
                'Goniometer Vector ax.2.2':'float',
                'Goniometer Vector ax.2.3':'float',
                'Goniometer Vector ax.3.1':'float',
                'Goniometer Vector ax.3.2':'float',
                'Goniometer Vector ax.3.3':'float',
                'Goniometer Vector ax.4.1':'float',
                'Goniometer Vector ax.4.2':'float',
                'Goniometer Vector ax.4.3':'float',
                'Goniometer Vector ax.5.1':'float',
                'Goniometer Vector ax.5.2':'float',
                'Goniometer Vector ax.5.3':'float',
                'Goniometer Start ax.1':'float',
                'Goniometer Start ax.2':'float',
                'Goniometer Start ax.3':'float',
                'Goniometer Start ax.4':'float',
                'Goniometer Start ax.5':'float',
                'Goniometer End ax.1':'float',
                'Goniometer End ax.2':'float',
                'Goniometer End ax.3':'float',
                'Goniometer End ax.4':'float',
                'Goniometer End ax.5':'float',
                'Goniometer Offset ax.1':'float',
                'Goniometer Offset ax.2':'float',
                'Goniometer Offset ax.3':'float',
                'Goniometer Offset ax.4':'float',
                'Goniometer Offset ax.5':'float',
                'Goniometer Scan Axis':'long',
                'Axes Names':40,
                'file':16,
                'cmnt':20,
                'smpl':20,
                'iext':'long',
                'reso':'long',
                'save':'long',
                'dint':'long',
                'byte':'long',
                'init':'long',
                'ipus':'long',
                'dexp':'long',
                'expn':'long',
                'posx':20,
                'posy':20,
                'xray':'long',

                'Header Leftovers':-1,
C:192,8:raxisimage.rigakuKeys: Invalid name "RKey" (should match [a-z_][a-zA-Z0-9_]{2,30}$)
C:309,8:raxisimage.rigakuKeys: Operator not preceded by a space
        orderList=[
                 ^
                'InstrumentType',
                'Version',
                'Crystal Name',
                'Crystal System',
                'A',
                'B',
                'C',
                'Alpha',
                'Beta',
                'Gamma',
                'Space Group',
                'Mosaicity',
                'Memo',
                'Date',
                'Reserved Space 1',
                'User',
                'Xray Target',
                'Wavelength',
                'Monochromator',
                'Monochromator 2theta',
                'Collimator',
                'Filter',
                'Crystal-to-detector Distance',
                'Generator Voltage',
                'Generator Current',
                'Focus',
                'Xray Memo',
                'IP shape',
                'Oscillation Type',
                'Reserved Space 2',
                'Crystal Mount (spindle axis)',
                'Crystal Mount (beam axis)',
                'Phi Datum',
                'Phi Oscillation Start',
                'Phi Oscillation Stop',
                'Frame Number',
                'Exposure Time',
                'Direct beam X position',
                'Direct beam Y position',
                'Omega Angle',
                'Chi Angle',
                '2Theta Angle',
                'Mu Angle',
                'Image Template',
                'X Pixels',
                'Y Pixels',
                'X Pixel Length',
                'Y Pixel Length',
                'Record Length',
                'Total',
                'Starting Line',
                'IP Number',
                'Photomultiplier Ratio',
                'Fade Time (to start of read)',
                'Fade Time (to end of read)',
                'Host Type/Endian',
                'IP Type',
                'Horizontal Scan',
                'Vertical Scan',
                'Front/Back Scan',
                'Pixel Shift (RAXIS V)',
                'Even/Odd Intensity Ratio (RAXIS V)',
                'Magic number',
                'Number of Axes',
                'Goniometer Vector ax.1.1',
                'Goniometer Vector ax.1.2',
                'Goniometer Vector ax.1.3',
                'Goniometer Vector ax.2.1',
                'Goniometer Vector ax.2.2',
                'Goniometer Vector ax.2.3',
                'Goniometer Vector ax.3.1',
                'Goniometer Vector ax.3.2',
                'Goniometer Vector ax.3.3',
                'Goniometer Vector ax.4.1',
                'Goniometer Vector ax.4.2',
                'Goniometer Vector ax.4.3',
                'Goniometer Vector ax.5.1',
                'Goniometer Vector ax.5.2',
                'Goniometer Vector ax.5.3',
                'Goniometer Start ax.1',
                'Goniometer Start ax.2',
                'Goniometer Start ax.3',
                'Goniometer Start ax.4',
                'Goniometer Start ax.5',
                'Goniometer End ax.1',
                'Goniometer End ax.2',
                'Goniometer End ax.3',
                'Goniometer End ax.4',
                'Goniometer End ax.5',
                'Goniometer Offset ax.1',
                'Goniometer Offset ax.2',
                'Goniometer Offset ax.3',
                'Goniometer Offset ax.4',
                'Goniometer Offset ax.5',
                'Goniometer Scan Axis',
                'Axes Names',
                'file',
                'cmnt',
                'smpl',
                'iext',
                'reso',
                'save',
                'dint',
                'byte',
                'init',
                'ipus',
                'dexp',
                'expn',
                'posx',
                'posy',
                'xray',
                'Header Leftovers'
C:425,8:raxisimage.rigakuKeys: Comma not followed by a space
        return RKey,orderList
                   ^^
R:190,4:raxisimage.rigakuKeys: Method could be a function
R: 30,0:raxisimage: Too many public methods (27/20)


Report
======
100 statements analysed.

Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |37     |NC       |NC         |
+-----------+-------+---------+-----------+
|refactor   |2      |NC       |NC         |
+-----------+-------+---------+-----------+
|warning    |4      |NC       |NC         |
+-----------+-------+---------+-----------+
|error      |1      |NC       |NC         |
+-----------+-------+---------+-----------+



Messages
--------

+-----------+------------+
|message id |occurrences |
+===========+============+
|C0322      |27          |
+-----------+------------+
|C0103      |7           |
+-----------+------------+
|W1201      |2           |
+-----------+------------+
|C0324      |2           |
+-----------+------------+
|W0612      |1           |
+-----------+------------+
|W0511      |1           |
+-----------+------------+
|R0904      |1           |
+-----------+------------+
|R0201      |1           |
+-----------+------------+
|E0602      |1           |
+-----------+------------+
|C0111      |1           |
+-----------+------------+



Global evaluation
-----------------
Your code has been rated at 5.20/10
Just the bare minimum. Give it a bit more polish. 

Raw metrics
-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |109    |26.08 |NC       |NC         |
+----------+-------+------+---------+-----------+
|docstring |266    |63.64 |NC       |NC         |
+----------+-------+------+---------+-----------+
|comment   |14     |3.35  |NC       |NC         |
+----------+-------+------+---------+-----------+
|empty     |29     |6.94  |NC       |NC         |
+----------+-------+------+---------+-----------+



Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |1      |NC         |NC         |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |1      |NC         |NC         |100.00      |100.00   |
+---------+-------+-----------+-----------+------------+---------+
|method   |5      |NC         |NC         |80.00       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |0      |NC         |NC         |0           |0        |
+---------+-------+-----------+-----------+------------+---------+



Duplication
-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |NC       |NC         |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |NC       |NC         |
+-------------------------+------+---------+-----------+



External dependencies
---------------------
::

    numpy (raxisimage)



