|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFibreModule
class FibreModule
The class FibreModule contains methods to perform various operations allowing access to all parameters of the fibre module, and it's associated fibres. It also provides methods to set parameters of the fibre module, and to methods to provide persistence of the data relating to the fibre module, through the use of disk files.
Field Summary | |
---|---|
private double |
bufferFactor
Buffer factor around fibres applies a 10% buffer around all fibre dimensions |
private int |
ButtonLength
|
private int |
ButtonWidth
|
private int |
CircleRadius
|
private int |
FIBRE_MAXIMUM_POSITION_ERROR
The maximum allowable positioning error for any fibre. |
private int |
FIBRE_MINIMUM_POSITION_SEPARATION
|
private int |
FibreLength
|
private java.lang.String |
FibreModuleDataFileName
|
private java.lang.String |
FibreModuleErrorDataFileName
|
private java.lang.String |
FibreModuleName
|
private Fibre[] |
Fibres
The array of fibres in the fibre module |
private double |
FibreSize
|
private java.lang.String |
LARGE_FIBRE_MODULE_CONFIGURATION_FILE
|
private java.lang.String |
LARGE_FIBRE_MODULE_ERROR_FILE
|
private int |
LoadRadius
|
private int |
NoAcquisition
|
private double |
NonRadialAngle
|
private int |
NoPivots
|
private NoticeBoard |
noticeBoard
|
private int |
NoUnused
|
private int |
ParkRadius
|
private int |
PivotRadius
|
private double |
scale0
0th order term of plate scale |
private double |
scale1
1st order term of plate scale |
private double |
scale2
2nd order term of plate scale |
private java.lang.String |
SMALL_FIBRE_MODULE_CONFIGURATION_FILE
|
private java.lang.String |
SMALL_FIBRE_MODULE_ERROR_FILE
|
private int |
TubeWidth
|
private java.lang.String |
WHT_LARGE_FIBRE_MODULE_CONFIGURATION_FILE
|
private java.lang.String |
WHT_LARGE_FIBRE_MODULE_ERROR_FILE
|
private java.lang.String |
WHT_PRIME_DISTORTION_FILE
|
private java.lang.String |
WHT_SMALL_FIBRE_MODULE_CONFIGURATION_FILE
|
private java.lang.String |
WHT_SMALL_FIBRE_MODULE_ERROR_FILE
|
private java.lang.String |
WhtFibreModuleDataFileName
|
private java.lang.String |
WhtFibreModuleErrorDataFileName
|
Constructor Summary | |
---|---|
FibreModule()
Constructor |
Method Summary | |
---|---|
private void |
check()
Check that all of the fibres in the fibre module are in valid positions |
private void |
closeFile(java.io.BufferedReader theFile)
|
private java.awt.Point |
convert_xy(java.lang.String RA,
java.lang.String Dec,
java.lang.String Equinox,
java.lang.String RA_centre,
java.lang.String Dec_centre,
java.lang.String LASidTime,
java.lang.String SkyPA,
java.lang.String UTDate,
double scale0,
double scale1,
double scale2)
Native method to RA and Dec coordinates to an AF2 XY cordinate |
private void |
copy(java.lang.String srcFilename,
java.lang.String dstFilename)
Copy a file |
private double |
extractDoubleFromInputLine(java.io.BufferedReader input)
|
private java.lang.String |
extractFirstWordFromInputLine(java.io.BufferedReader input)
|
private int |
extractIntFromInputLine(java.io.BufferedReader input)
|
private java.lang.String |
extractStringFromInputLine(java.io.BufferedReader input)
|
private double |
getBufferFactor()
Get the buffer factor around the fibres |
(package private) int |
getButtonLength()
Get the fibre button length |
(package private) int |
getButtonLengthBuffered()
Get the fibre button length with a buffer applied |
(package private) int |
getButtonWidth()
Get the fibre button width |
(package private) int |
getButtonWidthBuffered()
Get the fibre button width with a buffer applied |
private int |
getCircleRadius()
Get the circle radius of the fibre module |
private void |
getDistortionData(java.lang.String distortionDataFile)
Get the field distortion data from the distortion file |
(package private) Fibre |
getFibre(int FibreNumber)
Get a fibre by it's fibre number |
(package private) java.awt.Point |
getFibreCreepOffset(Fibre theFibre)
Get the fibre creep error VC |
(package private) double |
getFibreDistance(Fibre fibre1,
Fibre fibre2)
Get the distance between 2 fibres |
(package private) int |
getFibreLength()
Get the length of a fibre in the fibre module |
private void |
getFibreModuleData(java.lang.String fibreDataFile)
Get the fibre data file and extract the current fibre information. |
private void |
getFibreModuleErrorData(java.lang.String fibreErrorDataFile)
Get the learnt values of putdown offset error and creep error from the fibre module's error table |
private java.awt.Point |
getFibreOffset(Fibre theFibre)
Get the learnt fibre putdown error offset VE |
(package private) java.awt.Point |
getFibrePutdownError(Fibre theFibre)
|
(package private) java.awt.Point |
getFibrePutdownOffset(Fibre theFibre)
Get the required putdown offset for a fibre. |
(package private) java.awt.Point |
getFixedFibreFinOffset(int FibreNumber)
Get the fixed offset between the fibre and the fin |
(package private) double |
getGuideFibreRmsError()
Get the RMS positioning error of the guide fibres |
private int |
getLoadRadius()
Get the load radius of the fibre module |
(package private) Fibre |
getLostFibre()
Get a lost fibre |
(package private) java.lang.String |
getName()
Get the name of the fibre module |
(package private) Fibre |
getNearestFibre(Fibre theFibre)
Get the nearest fibre to a fibre |
(package private) Fibre |
getNearestFibre(java.awt.Point thePosition)
Get the nearest fibre to a position |
private double |
getNonRadialAngle()
Get the maximum non radial angle allowed for each fibre |
(package private) double |
getNonRadialAngleInArcmins()
Get the maximum non radial angle allowed for each fibre |
(package private) int |
getNumberOfDisabledFibres()
Get the number of disabled fibres in the fibre module |
(package private) int |
getNumberOfFiducialFibres()
Get the number of fiducial fibres in the fibre module |
(package private) int |
getNumberOfObjectFibres()
Get the number of object fibres in the fibre module |
(package private) int |
getNumberOfPivots()
Get the number of pivots in the fibre module |
(package private) int |
getNumberOfUnsusedFibres()
Get the number of unused fibres in the fibre module |
private int |
getParkRadius()
Get the park radius of the fibre module |
private int |
getPivotRadius()
Get the pivot radius of the fibre module |
private double |
getScale0()
Get the 0th order term of plate scale |
private double |
getScale1()
Get the 1st order term of plate scale |
private double |
getScale2()
Get the 2nd order term of plate scale |
(package private) double |
getScienceFibreRmsError()
Get the RMS positioning error of the science fibres |
(package private) int |
getTubeWidth()
Get the fibre tube width |
(package private) int |
getTubeWidthBuffered()
Get the fibre tube width with a buffer applied |
private boolean |
hasFibre(int theFibreNumber)
Check whether a fibre exists |
(package private) boolean |
isCloseToAnotherFibre(Fibre thisFibre)
Ask whether a fibre is too close to another fibre |
(package private) boolean |
isFibreLost()
Determine if a fibre is currently lost |
(package private) boolean |
isFibreMovementRequired(Fibre theFibre,
Fibre theTarget,
int tolerance)
Check whether movement of a fibre is required |
private boolean |
isLengthOK(Fibre thisFibre)
Check that the length of the fibre is OK |
(package private) boolean |
isNotColliding(Fibre thisFibre)
Check that a fibre does not collide with any other fibres in the module |
(package private) boolean |
isPositionOK(Fibre thisFibre)
Check that the position of a fibre is valid |
private boolean |
isRadial(Fibre thisFibre)
Check that the fibre is within it's radial angle tolerance |
(package private) boolean |
isWithinField(Fibre thisFibre)
Check that the fibre is within the observable field |
private boolean |
isWithinLoadRing(Fibre thisFibre)
Check that the fibre is within the load ring |
private java.io.BufferedReader |
openFile(java.lang.String filename)
|
private java.lang.String |
rightAlign(long number,
int FieldSize)
Right align a number |
private void |
saveFibreModuleErrorData()
|
private void |
saveFibreState(Fibre theFibre)
|
(package private) void |
saveModuleState()
|
(package private) void |
setCirclePosition(Fibre thisFibre)
|
(package private) void |
setFibreCreepOffset(Fibre theFibre,
java.awt.Point gripperOpenPosition,
java.awt.Point gripperClosedPosition)
Set the fibre's creep offset vector |
(package private) void |
setFibreErrorOffset(Fibre theFibre,
java.awt.Point gripperClosedPosition,
java.awt.Point robotPosition)
Set the fibre's error offset vector |
(package private) void |
setFibrePosition(Fibre thisFibre,
java.awt.Point thisPosition)
Set the fibre's new position |
(package private) void |
setFibrePosition(TargetFibre theTargetFibre,
Configuration thisConfiguration)
Set a target fibre's position for a configuration |
(package private) void |
setFibrePosition(TargetFibre theTargetFibre,
java.awt.Point thisPosition)
Set the target fibre's position |
(package private) void |
setFibrePutdownError(Fibre theFibre,
java.awt.Point theFibrePosition,
java.awt.Point theRobotPosition)
|
(package private) void |
setLoadRingPosition()
Set the position of all of the fibres in the fibre module to the position of the load ring |
(package private) void |
setLoadRingPosition(Fibre thisFibre)
Set the position of a fibre to the position of the load ring |
(package private) void |
setParkPosition(Fibre thisFibre)
|
(package private) void |
setPositionNoMove(Fibre thisFibre)
|
private void |
synchroniseFiles(java.lang.String fileName1,
java.lang.String fileName2)
Synchronise two copies of a file Copy the newer file to the older file |
java.lang.String |
toString()
Returns a string representation of the object |
(package private) void |
updateNoticeBoard()
Update the parameter noticeboard with the fibre module details |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final java.lang.String SMALL_FIBRE_MODULE_CONFIGURATION_FILE
private final java.lang.String SMALL_FIBRE_MODULE_ERROR_FILE
private final java.lang.String LARGE_FIBRE_MODULE_CONFIGURATION_FILE
private final java.lang.String LARGE_FIBRE_MODULE_ERROR_FILE
private final java.lang.String WHT_SMALL_FIBRE_MODULE_CONFIGURATION_FILE
private final java.lang.String WHT_SMALL_FIBRE_MODULE_ERROR_FILE
private final java.lang.String WHT_LARGE_FIBRE_MODULE_CONFIGURATION_FILE
private final java.lang.String WHT_LARGE_FIBRE_MODULE_ERROR_FILE
private final java.lang.String WHT_PRIME_DISTORTION_FILE
private final int FIBRE_MAXIMUM_POSITION_ERROR
private final int FIBRE_MINIMUM_POSITION_SEPARATION
private final double bufferFactor
private java.lang.String FibreModuleName
private java.lang.String FibreModuleDataFileName
private java.lang.String FibreModuleErrorDataFileName
private java.lang.String WhtFibreModuleDataFileName
private java.lang.String WhtFibreModuleErrorDataFileName
private int NoPivots
private int NoAcquisition
private int NoUnused
private double NonRadialAngle
private int FibreLength
private int TubeWidth
private int ButtonWidth
private int ButtonLength
private double FibreSize
private int PivotRadius
private int ParkRadius
private int LoadRadius
private final int CircleRadius
private double scale0
private double scale1
private double scale2
private NoticeBoard noticeBoard
private Fibre[] Fibres
Constructor Detail |
---|
FibreModule()
Method Detail |
---|
private java.awt.Point convert_xy(java.lang.String RA, java.lang.String Dec, java.lang.String Equinox, java.lang.String RA_centre, java.lang.String Dec_centre, java.lang.String LASidTime, java.lang.String SkyPA, java.lang.String UTDate, double scale0, double scale1, double scale2)
RA
- The RA of the objectDec
- The Dec of the objectEquinox
- The EquinoxRA_centre
- The RA centre of the fieldDec_centre
- The Dec centre of the fieldLASidTime
- The sidereal timeSkyPA
- The Sky PAUTDate
- The UT datescale0
- 0th order term of plate scalescale1
- 1st order term of plate scalescale2
- 2nd order term of plate scale
private void check()
private void getDistortionData(java.lang.String distortionDataFile)
distortionDataFile
- The name of the distortion fileprivate void getFibreModuleData(java.lang.String fibreDataFile)
fibreDataFile
- The name of the fibre module data file (xxxxx_fibres.dat)private void getFibreModuleErrorData(java.lang.String fibreErrorDataFile)
fibreErrorDataFile
- The path to the fibre module's error table filejava.lang.String getName()
private double getScale0()
private double getScale1()
private double getScale2()
private int getLoadRadius()
private int getParkRadius()
private int getPivotRadius()
private int getCircleRadius()
private double getNonRadialAngle()
double getNonRadialAngleInArcmins()
int getFibreLength()
private double getBufferFactor()
int getButtonWidth()
int getButtonLength()
int getTubeWidth()
int getButtonWidthBuffered()
int getButtonLengthBuffered()
int getTubeWidthBuffered()
int getNumberOfPivots()
int getNumberOfUnsusedFibres()
int getNumberOfFiducialFibres()
int getNumberOfObjectFibres()
int getNumberOfDisabledFibres()
Fibre getFibre(int FibreNumber)
FibreNumber
- The number of the fibre
Fibre getLostFibre()
Fibre getNearestFibre(java.awt.Point thePosition)
thePosition
- The position
Fibre getNearestFibre(Fibre theFibre)
theFibre
- The fibre
java.awt.Point getFixedFibreFinOffset(int FibreNumber)
FibreNumber
- The number of the fibre
java.awt.Point getFibrePutdownOffset(Fibre theFibre)
theFibre
- The fibre
private java.awt.Point getFibreOffset(Fibre theFibre)
theFibre
- The fibre
java.awt.Point getFibreCreepOffset(Fibre theFibre)
theFibre
- The fibre
void setFibreCreepOffset(Fibre theFibre, java.awt.Point gripperOpenPosition, java.awt.Point gripperClosedPosition)
theFibre
- The fibregripperOpenPosition
- The position of the fibre with the gripper opengripperClosedPosition
- The position of the fibre with the gripper closedvoid setFibreErrorOffset(Fibre theFibre, java.awt.Point gripperClosedPosition, java.awt.Point robotPosition)
theFibre
- The fibregripperClosedPosition
- The position of the fibre with the gripper closedrobotPosition
- The position of the robotvoid setFibrePutdownError(Fibre theFibre, java.awt.Point theFibrePosition, java.awt.Point theRobotPosition)
java.awt.Point getFibrePutdownError(Fibre theFibre)
double getFibreDistance(Fibre fibre1, Fibre fibre2)
fibre1
- Fibre 1fibre2
- Fibre 2
double getScienceFibreRmsError()
double getGuideFibreRmsError()
boolean isFibreMovementRequired(Fibre theFibre, Fibre theTarget, int tolerance)
theFibre
- The fibre to be movedtheTarget
- The target for the fibretolerance
- The required tolerance in microns
boolean isPositionOK(Fibre thisFibre)
thisFibre
- The fibre to be checked
boolean isNotColliding(Fibre thisFibre)
thisFibre
- The fibre to be checked
boolean isCloseToAnotherFibre(Fibre thisFibre)
thisFibre
- The fibre
private boolean isRadial(Fibre thisFibre)
thisFibre
- The fibre to be checked
boolean isFibreLost()
private boolean hasFibre(int theFibreNumber)
theFibreNumber
- The number of the fibre
private boolean isLengthOK(Fibre thisFibre)
thisFibre
- The fibre to be checked
private boolean isWithinLoadRing(Fibre thisFibre)
thisFibre
- The fibre to be checked
boolean isWithinField(Fibre thisFibre)
thisFibre
- The fibre to be checked
void setFibrePosition(Fibre thisFibre, java.awt.Point thisPosition)
thisFibre
- The fibrethisPosition
- The fibre's positionvoid setFibrePosition(TargetFibre theTargetFibre, java.awt.Point thisPosition)
theTargetFibre
- The target fibrethisPosition
- The target fibre's positionvoid setFibrePosition(TargetFibre theTargetFibre, Configuration thisConfiguration)
theTargetFibre
- The target fibrethisConfiguration
- The configurationvoid setLoadRingPosition(Fibre thisFibre)
thisFibre
- The fibre to be marked as positioned in the load ringvoid setLoadRingPosition()
void setParkPosition(Fibre thisFibre)
void setCirclePosition(Fibre thisFibre)
void setPositionNoMove(Fibre thisFibre)
private double extractDoubleFromInputLine(java.io.BufferedReader input)
private int extractIntFromInputLine(java.io.BufferedReader input)
private java.lang.String extractFirstWordFromInputLine(java.io.BufferedReader input)
private java.lang.String extractStringFromInputLine(java.io.BufferedReader input)
private java.io.BufferedReader openFile(java.lang.String filename)
private void closeFile(java.io.BufferedReader theFile)
void saveModuleState()
void updateNoticeBoard()
private void saveFibreState(Fibre theFibre)
private void saveFibreModuleErrorData()
private java.lang.String rightAlign(long number, int FieldSize)
number
- The number to be right alignedFieldSize
- The size of the string field
private void copy(java.lang.String srcFilename, java.lang.String dstFilename)
srcFilename
- The src file namedstFilename
- The destination file nameprivate void synchroniseFiles(java.lang.String fileName1, java.lang.String fileName2)
fileName1
- Name of file1fileName2
- Name of file2public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |