astro.fits
Class ReductionMaster.ImageBlock

java.lang.Object
  extended by astro.fits.ReductionMaster.ImageBlock
All Implemented Interfaces:
Serializable, Comparable<ReductionMaster.ImageBlock>
Enclosing class:
ReductionMaster

public static class ReductionMaster.ImageBlock
extends Object
implements Comparable<ReductionMaster.ImageBlock>, Serializable

This class represents a block of identical type taken consecuetively during a single night on the same telescope.

See Also:
Serialized Form

Field Summary
private  Number derotator
          The derotator offset, if blocking criterium (flats).
private  String filter
          The color filter, if blocking criterium (flat, science).
private  Date first
          The first date as found in the first image in the block.
private  String id
          The unique id of the block, equal to fitst unique of fits.
private  Date last
          The last date as found in the first image in the block.
private  SortedMap<String,ReductionMaster.ImageInfo> objid
          The sorted list of object ids.
private  String telescope
          The telescope name.
private  ObserveSql.Types type
          The type of block.
 
Constructor Summary
private ReductionMaster.ImageBlock(ObserveSql.Types typ, String tel, SortedMap<String,ReductionMaster.ImageInfo> obj, Date from, Date to)
          Constructs a new image block.
private ReductionMaster.ImageBlock(ObserveSql.Types typ, String tel, SortedMap<String,ReductionMaster.ImageInfo> obj, Date from, Date to, String filt)
          Constructs a new image block.
private ReductionMaster.ImageBlock(ObserveSql.Types typ, String tel, SortedMap<String,ReductionMaster.ImageInfo> obj, Date from, Date to, String filt, Number derot)
          Constructs a new image block.
 
Method Summary
 int compareTo(ReductionMaster.ImageBlock that)
          Order is to first image in list.
 boolean equals(Object th)
          Two image blocks are equal if they are drawn from the same telescope, have the same image type, are identical in begin and end and have the same number of ids.
 Number getDerotator()
          Returns the derotator, if a blocking criterium, otherwise null.
 long getDuration()
          Returns the duration of this block in ms.
 Date getEnd()
          Returns the end time of the block, excluding exposure time of last frame.
 String getFilter()
          Returns the filter, if a blocking criterium, otherwise null.
 ReductionMaster.ImageInfo getInfo(String id)
          Returns the image info to the stated unique.
 Date getStart()
          Returns the beginning time of the block.
 String getTelescope()
          Returns the telescope.
 ObserveSql.Types getType()
          Returns the type
 String getUnique()
          Returns the unique id of this block.
 List<String> getUniqueList()
          Returns all object-ids in this block in natural order.
 int hashCode()
          The hash code is the hash code of the first date.
 int size()
          Number of image infos in this block.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private String id
The unique id of the block, equal to fitst unique of fits.


type

private ObserveSql.Types type
The type of block.


telescope

private String telescope
The telescope name.


objid

private transient SortedMap<String,ReductionMaster.ImageInfo> objid
The sorted list of object ids.


first

private Date first
The first date as found in the first image in the block.


last

private Date last
The last date as found in the first image in the block.


filter

private String filter
The color filter, if blocking criterium (flat, science).


derotator

private Number derotator
The derotator offset, if blocking criterium (flats).

Constructor Detail

ReductionMaster.ImageBlock

private ReductionMaster.ImageBlock(ObserveSql.Types typ,
                                   String tel,
                                   SortedMap<String,ReductionMaster.ImageInfo> obj,
                                   Date from,
                                   Date to)
Constructs a new image block.


ReductionMaster.ImageBlock

private ReductionMaster.ImageBlock(ObserveSql.Types typ,
                                   String tel,
                                   SortedMap<String,ReductionMaster.ImageInfo> obj,
                                   Date from,
                                   Date to,
                                   String filt)
Constructs a new image block.


ReductionMaster.ImageBlock

private ReductionMaster.ImageBlock(ObserveSql.Types typ,
                                   String tel,
                                   SortedMap<String,ReductionMaster.ImageInfo> obj,
                                   Date from,
                                   Date to,
                                   String filt,
                                   Number derot)
Constructs a new image block.

Method Detail

getUnique

public String getUnique()
Returns the unique id of this block.


getType

public ObserveSql.Types getType()
Returns the type


getTelescope

public String getTelescope()
Returns the telescope.


getUniqueList

public List<String> getUniqueList()
Returns all object-ids in this block in natural order.


size

public int size()
Number of image infos in this block.


getInfo

public ReductionMaster.ImageInfo getInfo(String id)
Returns the image info to the stated unique.


getStart

public Date getStart()
Returns the beginning time of the block.


getEnd

public Date getEnd()
Returns the end time of the block, excluding exposure time of last frame.


getDuration

public long getDuration()
Returns the duration of this block in ms.


getFilter

public String getFilter()
Returns the filter, if a blocking criterium, otherwise null.


getDerotator

public Number getDerotator()
Returns the derotator, if a blocking criterium, otherwise null.


hashCode

public int hashCode()
The hash code is the hash code of the first date.

Overrides:
hashCode in class Object

equals

public boolean equals(Object th)
Two image blocks are equal if they are drawn from the same telescope, have the same image type, are identical in begin and end and have the same number of ids.

Overrides:
equals in class Object

compareTo

public int compareTo(ReductionMaster.ImageBlock that)
Order is to first image in list.

Specified by:
compareTo in interface Comparable<ReductionMaster.ImageBlock>