net.aerith.misao.catalog.io
Class TicReader

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

public class TicReader
extends CatalogReader

The TicReader is a class to read the Tycho Input Catalogue.

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.


Field Summary
protected  CircumArea circum_area
          The circum area to read stars.
protected  long current_block_index
          The index of the current block.
protected  int current_file_index
          The index of current file (0-3).
protected  int current_file_index_in_list
          The index of current file in file_list.
protected  java.io.BufferedReader current_reader
          The current_input stream reader.
protected  long current_star_index
          The index of the star in the current block.
protected static int[][] decl_end
          The largest Decl.
protected static int[][] decl_start
          The smallest Decl.
protected static int[] file_block_count
          The number of blocks of each files.
protected static double[] file_decl_end
          The end declinations of each files.
protected static double[] file_decl_start
          The start declinations of each files.
protected  java.util.Vector file_list
          The list of file index to be read.
protected static int file_N
          The number of files.
protected static java.lang.String[] filenames
          The file names.
protected static int[][] ra_end
          The largest R.A.
protected static int[][] ra_start
          The smallest R.A.
 
Fields inherited from class net.aerith.misao.catalog.io.CatalogReader
center_coor, date, limiting_mag, url_set
 
Constructor Summary
TicReader()
          Constructs an empty TicReader.
TicReader(java.net.URL url)
          Constructs a TicReader with URL of directory containing the AC 2000.2 Catalogue.
 
Method Summary
(package private) static void ()
          Sets the R.A.
 void close()
          Closes a catalog.
 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.
private static void initialize_Tic1()
          Initializes the R.A.
private static void initialize_Tic2()
          Initializes the R.A.
private static void initialize_Tic3()
          Initializes the R.A.
private static void initialize_Tic4()
          Initializes the R.A.
 boolean isInDirectory()
          Checks if the catalog data is in a directory.
 void open(Coor coor, double fov)
          Opens a catalog.
 CatalogStar readNext()
          Reads one data from the opened catalog.
 boolean supportsExamination()
          Checks if the catalog supports the use in PIXY examination.
 
Methods inherited from class net.aerith.misao.catalog.io.CatalogReader
addURL, getDateLimit, getDateLimitMessage, getFovLimit, getFovLimitMessage, hasDateLimit, hasFovLimit, isDateDependent, isFile, open, read, setDate, setDefaultURL, setLimitingMagnitude
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

file_N

protected static final int file_N
The number of files.

filenames

protected static final java.lang.String[] filenames
The file names.

file_decl_start

protected static final double[] file_decl_start
The start declinations of each files.

file_decl_end

protected static final double[] file_decl_end
The end declinations of each files.

file_block_count

protected static final int[] file_block_count
The number of blocks of each files.

ra_start

protected static int[][] ra_start
The smallest R.A. in degree of the block.

ra_end

protected static int[][] ra_end
The largest R.A. in degree of the block.

decl_start

protected static int[][] decl_start
The smallest Decl. in degree of the block.

decl_end

protected static int[][] decl_end
The largest Decl. in degree of the block.

current_reader

protected java.io.BufferedReader current_reader
The current_input stream reader.

current_file_index_in_list

protected int current_file_index_in_list
The index of current file in file_list.

current_file_index

protected int current_file_index
The index of current file (0-3).

current_block_index

protected long current_block_index
The index of the current block.

current_star_index

protected long current_star_index
The index of the star in the current block.

circum_area

protected CircumArea circum_area
The circum area to read stars.

file_list

protected java.util.Vector file_list
The list of file index to be read.
Constructor Detail

TicReader

public TicReader()
Constructs an empty TicReader.

TicReader

public TicReader(java.net.URL url)
Constructs a TicReader with URL of directory containing the AC 2000.2 Catalogue.
Parameters:
url - the URL of directory containing CD-ROMs data.
Method Detail

getName

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

isInDirectory

public boolean isInDirectory()
Checks if the catalog data is in a directory.
Overrides:
isInDirectory in class CatalogReader
Returns:
true if the catalog data is in a directory.

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.

getHelpMessage

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

open

public void open(Coor coor,
                 double fov)
          throws java.io.IOException,
                 java.io.FileNotFoundException,
                 CdromNotFoundException
Opens a catalog. This method must be invoked at first.
Overrides:
open in class CatalogReader
Parameters:
coor - the R.A. and Decl. of the center.
fov - the field of view to read in degree.
Throws:
java.io.IOException - if a file cannot be accessed.
java.io.FileNotFoundException - if a file does not exists in any URL, and the file is in any CD-ROMs.
CdromNotFoundException - if a file does not exists in any URL, and the file is in a CD-ROM.

readNext

public CatalogStar readNext()
                     throws java.io.IOException,
                            java.io.FileNotFoundException,
                            CdromNotFoundException,
                            QueryFailException
Reads one data from the opened catalog. After this method is invoked, the cursor is promoted to tne next star. When every data is read, it returns null. Note that data with the same ID are also returned one by one.
Overrides:
readNext in class CatalogReader
Returns:
a star data.
Throws:
java.io.IOException - if a file cannot be accessed.
java.io.FileNotFoundException - if a file does not exists in any URL, and the file is in any CD-ROMs.
CdromNotFoundException - if a file does not exists in any URL, and the file is in a CD-ROM.
QueryFailException - if the query to the server is failed.

close

public void close()
           throws java.io.IOException
Closes a catalog. This method must be invoked finally.
Overrides:
close in class CatalogReader
Throws:
java.io.IOException - if a file cannot be accessed.

initialize_Tic1

private static void initialize_Tic1()
Initializes the R.A. and Decl. of each blocks of tic1.dat.

initialize_Tic2

private static void initialize_Tic2()
Initializes the R.A. and Decl. of each blocks of tic2.dat.

initialize_Tic3

private static void initialize_Tic3()
Initializes the R.A. and Decl. of each blocks of tic3.dat.

initialize_Tic4

private static void initialize_Tic4()
Initializes the R.A. and Decl. of each blocks of tic4.dat.

static void ()
Sets the R.A. range of each block.