Package invocations :: Package cu2 :: Module cu2 :: Class JpgCalc
[hide private]

Class JpgCalc

source code


Instance Methods [hide private]
 
pooling(self, inputs)
Create a pool using all CPUs and farm out the calculations.
source code
 
calculate(self, args)
Calculate JPGs.
source code
 
createCompressedImage(self, fileName, dateVersStr, jpgPath)
Creates a JPEG compressed image of the given FITS file.
source code
 
getArrowCoords(self, fitsFileHDUs, arrays)
Calculate unit coords for the N/E arrows.
source code
 
getJpegName(self, fileName, jpgPath)
Create the full JPG file path.
source code
PIL image object
makeOverlay(self, image, arrows, thetaRad=0.0)
Make the N/E axes overlay.
source code
tuple or list(tuples)
coordAdd(self, coord1, coord2)
Routine to add one coordinate pair to another or a list of coordinates.
source code
tuple or list(tuples)
coordRot(self, coord, thetaRad)
Routine to rotate coordinate pairs (x,y).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  numprocessors = 1
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

pooling(self, inputs)

source code 

Create a pool using all CPUs and farm out the calculations.

Parameters:
  • inputs (list(tuple(str))) - List containing argument tuples for JPG calculation.

calculate(self, args)

source code 

Calculate JPGs.

Parameters:
  • args (args) - Arguments for createCompressedImage.

createCompressedImage(self, fileName, dateVersStr, jpgPath)

source code 

Creates a JPEG compressed image of the given FITS file.

Parameters:
  • fileName (str) - Full path to the FITS file.
  • dateVersStr (str) - Date-version string of the processed file batch.

getArrowCoords(self, fitsFileHDUs, arrays)

source code 

Calculate unit coords for the N/E arrows.

Parameters:
  • fitsFileHDUs (pyfits HDU list) - The FITS file HDU list the coords should be created for.
  • arrays (list) - List of available HDUs.

makeOverlay(self, image, arrows, thetaRad=0.0)

source code 

Make the N/E axes overlay.

Parameters:
  • image (PIL image object) - The image for which the overlay is produced.
  • thetaRad (double) - Rotation angle of the overlay in radians.thetaRad=0.0
Returns: PIL image object
The updated image.

coordAdd(self, coord1, coord2)

source code 

Routine to add one coordinate pair to another or a list of coordinates.

Parameters:
  • coord1 (tuple) - Single coordinate (x,y).
  • coord2 (tuple or list(tuples)) - Single coordinate or list of coordinates.
Returns: tuple or list(tuples)
Added coordinates.

coordRot(self, coord, thetaRad)

source code 

Routine to rotate coordinate pairs (x,y).

Parameters:
  • coord (tuple or list(tuples)) - Single coordinate or list of coordinates.
  • thetaRad (double) - Rotation angle in radians.
Returns: tuple or list(tuples)
Rotated coordinates.