net.aerith.misao.catalog.io
Class TychoReader

java.lang.Object
  |
  +--net.aerith.misao.catalog.io.CatalogReader
        |
        +--net.aerith.misao.catalog.io.FileReader
              |
              +--net.aerith.misao.catalog.io.TychoReader

public class TychoReader
extends FileReader

The TychoReader is a class to read the Tycho Catalogue file.

The (x,y) position is also set properly so that (0,0) represents the specified R.A. and Decl. to open method and (1,1) represents the position 1 deg to the west and 1 deg to the north.


Fields inherited from class net.aerith.misao.catalog.io.FileReader
circum_area, current_block, current_index, reader
 
Fields inherited from class net.aerith.misao.catalog.io.CatalogReader
center_coor, date, limiting_mag, url_set
 
Constructor Summary
TychoReader()
          Constructs an empty TychoReader.
TychoReader(java.net.URL url)
          Constructs a TychoReader with URL of the catalog file.
 
Method Summary
 CatalogStar createStar(java.lang.String record)
          Creates a CatalogStar object from the specified one line record in the file.
 long getBlockCount()
          Gets the number of blocks in a file.
 long getBlockSize()
          Gets the number of records in a block.
 java.lang.String getHelpMessage()
          Gets the help message.
 double getMaximumPositionErrorInArcsec()
          Gets the maximum error of position in arcsec.
 java.lang.String getName()
          Gets the catalog name.
 long getRecordSize()
          Gets the characters of a record.
 boolean overlapsBlock()
          Checks if the current block is overlapping on the specified circum area.
 boolean supportsExamination()
          Checks if the catalog supports the use in PIXY examination.
 
Methods inherited from class net.aerith.misao.catalog.io.FileReader
close, isFile, open, readNext
 
Methods inherited from class net.aerith.misao.catalog.io.CatalogReader
addURL, getDateLimit, getDateLimitMessage, getFovLimit, getFovLimitMessage, hasDateLimit, hasFovLimit, isDateDependent, isInDirectory, open, read, setDate, setDefaultURL, setLimitingMagnitude
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

TychoReader

public TychoReader()
Constructs an empty TychoReader.

TychoReader

public TychoReader(java.net.URL url)
Constructs a TychoReader with URL of the catalog file.
Parameters:
url - the URL of the catalog file.
Method Detail

getName

public java.lang.String getName()
Gets the catalog name. It must be unique among all subclasses.
Overrides:
getName in class FileReader
Returns:
the catalog name.

supportsExamination

public boolean supportsExamination()
Checks if the catalog supports the use in PIXY examination.
Overrides:
supportsExamination in class CatalogReader
Returns:
true if the catalog can be used in PIXY examination.

getMaximumPositionErrorInArcsec

public double getMaximumPositionErrorInArcsec()
Gets the maximum error of position in arcsec. It is the search area size to identify with other stars.
Overrides:
getMaximumPositionErrorInArcsec in class CatalogReader
Returns:
the maximum error of position in arcsec.

createStar

public CatalogStar createStar(java.lang.String record)
Creates a CatalogStar object from the specified one line record in the file. If some more records are required to create a star object, it returns null. This method must be overrided in the subclasses.
Overrides:
createStar in class FileReader
Parameters:
record - the one line record in the file.
Returns:
the star object.

getHelpMessage

public java.lang.String getHelpMessage()
Gets the help message.
Overrides:
getHelpMessage in class CatalogReader
Returns:
the help message.

getBlockCount

public long getBlockCount()
Gets the number of blocks in a file. If 0, it means the file is not separated into blocks. It must be overrided in the subclasses if neccessary.
Overrides:
getBlockCount in class FileReader
Returns:
the size of a block.

getBlockSize

public long getBlockSize()
Gets the number of records in a block. If 0, it means the file is not separated into blocks. It must be overrided in the subclasses if neccessary.
Overrides:
getBlockSize in class FileReader
Returns:
the size of a block.

getRecordSize

public long getRecordSize()
Gets the characters of a record. If 0, it means the record size is not constant, so the reader skips the specified lines while reading one line by one. Otherwise, the reader skips the specified characters at one time. It must be overrided in the subclasses if neccessary.
Overrides:
getRecordSize in class FileReader
Returns:
the size of a record.

overlapsBlock

public boolean overlapsBlock()
Checks if the current block is overlapping on the specified circum area.
Overrides:
overlapsBlock in class FileReader
Returns:
true if the current block is overlapping on the specified circum area.