edu.iris.Fissures.seed.builder
Class AhExportBuilder

java.lang.Object
  extended by edu.iris.Fissures.seed.builder.ExportBuilder
      extended by edu.iris.Fissures.seed.builder.BasicExportBuilder
          extended by edu.iris.Fissures.seed.builder.AhExportBuilder

public class AhExportBuilder
extends BasicExportBuilder

Concrete Builder class for exporting Blockette objects from the SeedObjectContainer to the AH file format.


Nested Class Summary
protected static class AhExportBuilder.ComplexNumberList
          The complex number list.
protected static class AhExportBuilder.DoubleComplexNumber
          Double precision complex number.
 
Nested classes/interfaces inherited from class edu.iris.Fissures.seed.builder.BasicExportBuilder
BasicExportBuilder.ChannelInfo, BasicExportBuilder.ComplexNumber, BasicExportBuilder.DataInfo, BasicExportBuilder.EventInfo, BasicExportBuilder.ResponseInfo, BasicExportBuilder.StationInfo
 
Nested classes/interfaces inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
ExportBuilder.LogicalRecord
 
Field Summary
 
Fields inherited from class edu.iris.Fissures.seed.builder.BasicExportBuilder
currentChannel, currentStation, EMPTY_TEXT, eventInfo, padFlag, stationList, TWO_PI, ZERO_NUMBER
 
Fields inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
builderType, endOfGroup, endOfLogical, endOfPhysical, exportMold, exportScript, logicalPerPhysical, logicalRecord, logicalRecordCount, logicalRecordLength, logicalRecords, nestingDepth, nestingScore, outputStream, padEnabledFlag, penDown, physicalRecordLength, recordPadding, scriptCursor, scriptNesting, vaxOrder
 
Constructor Summary
AhExportBuilder()
          Create an AH export builder.
 
Method Summary
protected  double calc_A0(AhExportBuilder.ComplexNumberList responsePoles, AhExportBuilder.ComplexNumberList responseZeroes, float ref_freq)
          Calculates the A0 value.
protected static boolean cmp_floats(float f1, float f2)
           
protected static void convertNumber(BasicExportBuilder.ComplexNumber n)
          Convert Type B (Hz) to Type A (rad/sec).
protected static double covertA0(double A0, int number_poles, int number_zeroes)
          Convert the A0 value.
protected static int determine_gamma(BasicExportBuilder.ChannelInfo ci, Blockette blk)
          Determines the gamma value.
protected  void fill_ah_resp(AhInfo.AhHed hed)
          Fill the response information.
protected  float get_A0(AhExportBuilder.ComplexNumberList responsePoles, AhExportBuilder.ComplexNumberList responseZeroes, java.util.List responses, int gamma, int max_pzs, AhInfo.AhHed hed)
          Get the A0 value.
 void maxamp(AhInfo.AhHed hed)
          Determines the maximum absolute amplitude of the data array, and places that number in hed.record.maxamp.
protected  void output_info()
          Output the AH information.
 
Methods inherited from class edu.iris.Fissures.seed.builder.BasicExportBuilder
blkGetNumber, blkGetNumber, blkGetNumber, blkGetString, blkGetString, blkGetTime, blkGetTime, checkTrigger, clearDataInfo, convertNumber, find_type_32, find_type_33, find_type_34, findChannelInfo, findStationInfo, getDataInfo, getEndTime, getEndTime, getFloatData, getIntegerData, initExportScript, packToRecord, packToRecord, padLogical, padPhysical, startNewLogical, volumeFinish
 
Methods inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
build, close, finish, getNext, getType, isPaddingEnabled, open, push, setLogicalRecLen, setPaddingEnabled, setPhysicalRecLen, setVaxOrder, startVolume, writeRecord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AhExportBuilder

public AhExportBuilder()
Create an AH export builder.

Method Detail

covertA0

protected static double covertA0(double A0,
                                 int number_poles,
                                 int number_zeroes)
Convert the A0 value.

Parameters:
A0 - the A0 value.
number_poles - the number of poles.
number_zeroes - the number of zeroes.
Returns:
the new A0 value.

convertNumber

protected static void convertNumber(BasicExportBuilder.ComplexNumber n)
Convert Type B (Hz) to Type A (rad/sec).

Parameters:
n - the Type B (Hz) complex number.

output_info

protected void output_info()
Output the AH information.

Overrides:
output_info in class BasicExportBuilder

fill_ah_resp

protected void fill_ah_resp(AhInfo.AhHed hed)
Fill the response information.

Parameters:
hed - the AH header.

get_A0

protected float get_A0(AhExportBuilder.ComplexNumberList responsePoles,
                       AhExportBuilder.ComplexNumberList responseZeroes,
                       java.util.List responses,
                       int gamma,
                       int max_pzs,
                       AhInfo.AhHed hed)
Get the A0 value.

Parameters:
responsePoles - the response poles.
responseZeroes - the response zeroes.
responses - the responses.
gamma - the gamma.
max_pzs - the maximum poles and zeroes.
hed - the AH header.
Returns:
the A0 value.

calc_A0

protected double calc_A0(AhExportBuilder.ComplexNumberList responsePoles,
                         AhExportBuilder.ComplexNumberList responseZeroes,
                         float ref_freq)
Calculates the A0 value.

Parameters:
responsePoles - the response poles.
responseZeroes - the response zeroes.
ref_freq - the reference frequency.
Returns:
the A0 value.

cmp_floats

protected static boolean cmp_floats(float f1,
                                    float f2)

determine_gamma

protected static int determine_gamma(BasicExportBuilder.ChannelInfo ci,
                                     Blockette blk)
Determines the gamma value.

Parameters:
ci - the channel information.
blk - the Blockette.
Returns:
the gamma value.

maxamp

public void maxamp(AhInfo.AhHed hed)
Determines the maximum absolute amplitude of the data array, and places that number in hed.record.maxamp.

Parameters:
hed - the AH header.