Exemplo n.º 1
0
def DatasetSummaryRecordType():
    '''
    Data Set Summary Record.
    http://www.ga.gov.au/__data/assets/pdf_file/0019/11719/GA10287.pdf Pg: 3-26.
    '''
    from isce3.parsers.CEOS.BasicTypes import (BlankType, IntegerType,
                                               FloatType, MultiType)
    from isce3.parsers.CEOS.DatasetSummaryRecordType import DatasetSummaryRecordCommonType

    #Common part of CEOS header
    inlist = DatasetSummaryRecordCommonType().mapping

    #ALOS specific trailer
    inlist += [('CalibrationDataIndicator', IntegerType(4)),
               ('StartLineNumberCalibrationUpper', IntegerType(8)),
               ('StopLineNumberCalibrationUpper', IntegerType(8)),
               ('StartLineNumberCalibrationBottom', IntegerType(8)),
               ('StopLineNumberCalibrationBottom', IntegerType(8)),
               ('PRFSwitchingIndicator', IntegerType(4)),
               ('LineLocatorOfPRFSwitching', IntegerType(8)),
               ('blanks14', BlankType(16)),
               ('YawSteeringModeFlag', IntegerType(4)),
               ('ParameterTableNumber', IntegerType(4)),
               ('NominalOffNadirAngle', FloatType(16)),
               ('AntennaBeamNumber', IntegerType(4)),
               ('blanks15', BlankType(28)), ('blanks16', BlankType(120)),
               ('NumberOfAnnotationPoints', IntegerType(8)),
               ('blanks17', BlankType(2082))]

    return MultiType(inlist)
Exemplo n.º 2
0
def SignalDataRecordType(pixels=None, bytesperpixel=None):
    '''
    SAR Signal Data Record.
    http://www.ga.gov.au/__data/assets/pdf_file/0019/11719/GA10287.pdf Pg:3-51.
    '''
    from isce3.parsers.CEOS.BasicTypes import (BlankType, StringType,
                                               IntegerType, BinaryType,
                                               MultiType)
    from isce3.parsers.CEOS.CEOSHeaderType import CEOSHeaderType

    return MultiType(CEOSHeaderType().mapping + [
        ('SARImageDataLineNumber',
         BinaryType('>i4')), ('SARImageDataRecordIndex', BinaryType('>i4')),
        ('ActualCountOfLeftFillPixels',
         BinaryType('>i4')), ('ActualCountOfDataPixels', BinaryType('>i4')),
        ('ActualCountOfRightFillPixels',
         BinaryType('>i4')), ('SensorParametersUpdateFlag', BinaryType('>i4')),
        ('SensorAcquisitionYear',
         BinaryType('>i4')), ('SensorAcquisitionDayOfYear', BinaryType('>i4')),
        ('SensorAcquisitionmsecsOfDay',
         BinaryType('>i4')), ('SARChannelIndicator', BinaryType('>i2')),
        ('SARChannelCode',
         BinaryType('>i2')), ('TransmitPolarization', BinaryType('>i2')),
        ('ReceivePolarization',
         BinaryType('>i2')), ('PRFInmHz', BinaryType('>i4')),
        ('ScanIDForScanSAR',
         BinaryType('>i4')), ('OnboardRangeCompressedFlag', BinaryType('>i2')),
        ('PulseTypeDesignator',
         BinaryType('>i2')), ('ChirpLengthInns', BinaryType('>i4')),
        ('ChirpConstantCoefficientInHz', BinaryType('>i4')),
        ('ChirpLinearCoefficientInHzperusec',
         BinaryType('>i4')), ('ChirpQuadraticCoefficient', BinaryType('>i4')),
        ('SensorAcquisitionusecsOfDay',
         BinaryType('>Q')), ('ReceiverGainIndB', BinaryType('>i4')),
        ('NoughtLineFlag', BinaryType('>i4')),
        ('ElectronicAntennaElevationAngleinudegrees', BinaryType('>i4')),
        ('MechanicalAntennaElevationAngleinudegrees', BinaryType('>i4')),
        ('ElectronicAntennaSquintAngleinudegrees', BinaryType('>i4')),
        ('MechanicalAntennaSquintAngleinudegrees',
         BinaryType('>i4')), ('SlantRangeToFirstSampleInm', BinaryType('>i4')),
        ('DataRecordWindowPositionInns',
         BinaryType('>i4')), ('blanks2', BlankType(4)),
        ('PlatformPositionParametersUpdateFlag',
         BinaryType('>i4')), ('PlatformLatitudeInudegrees', BinaryType('>i4')),
        ('PlatformLongitudeInudegrees',
         BinaryType('>i4')), ('PlatformAltitudeInm', BinaryType('>i4')),
        ('PlatformGroundSpeedIncmpersec', BinaryType('>i4')),
        ('PlatformVelocityIncmpersec', BinaryType('>i4', count=3)),
        ('PlatformAcceleration', BinaryType('>i4', count=3)),
        ('PlatformTrackAngleinudegrees', BinaryType('>i4')),
        ('PlatformTrackAngle2inudegrees', BinaryType('>i4')),
        ('PlatformPitchAngleinudegrees', BinaryType('>i4')),
        ('PlatformRollAngleinudegrees',
         BinaryType('>i4')), ('PlatformYawAngleinudegrees', BinaryType('>i4')),
        ('blanks3', BlankType(92)), ('PALSARFrameCounter', BinaryType('>i4')),
        ('PALSARAuxData', BlankType(256)),
        ('SARRawSignalData',
         BinaryType('>f{}'.format(bytesperpixel), count=pixels))
    ])
Exemplo n.º 3
0
def RadiometricRecordType():
    '''
    Radiometric Record.
    https://www.eorc.jaxa.jp/ALOS-2/en/doc/fdata/PALSAR-2_xx_Format_CEOS_E_f.pdf
    '''
    from isce3.parsers.CEOS.BasicTypes import (BlankType, BinaryType,
                                               StringType, IntegerType,
                                               FloatType, MultiType)
    from isce3.parsers.CEOS.CEOSHeaderType import CEOSHeaderType

    #Common part of CEOS header (modified)
    inlist = CEOSHeaderType().mapping
    inlist += [('SARChannelIndicator', BinaryType('>i4')),
               ('NumberOfDataSets', BinaryType('>i4')),
               ('CalibrationFactor', FloatType(16)),
               ('RealPartOfDT1,1', FloatType(16)),
               ('ImaginaryPartOfDT1,1', FloatType(16)),
               ('RealPartOfDT1,2', FloatType(16)),
               ('ImaginaryPartOfDT1,2', FloatType(16)),
               ('RealPartOfDT2,1', FloatType(16)),
               ('ImaginaryPartOfDT2,1', FloatType(16)),
               ('RealPartOfDT2,2', FloatType(16)),
               ('ImaginaryPartOfDT2,2', FloatType(16)),
               ('RealPartOfDR1,1', FloatType(16)),
               ('ImaginaryPartOfDR1,1', FloatType(16)),
               ('RealPartOfDR1,2', FloatType(16)),
               ('ImaginaryPartOfDR1,2', FloatType(16)),
               ('RealPartOfDR2,1', FloatType(16)),
               ('ImaginaryPartOfDR2,1', FloatType(16)),
               ('RealPartOfDR2,2', FloatType(16)),
               ('ImaginaryPartOfDR2,2', FloatType(16)),
               ('SkipBytes', BlankType(9577))]

    return MultiType(inlist)
Exemplo n.º 4
0
def CalibrationDataRecordTrailerType():
    '''
    This is ALOS-1 L0 data specific.
    '''
    from isce3.parsers.CEOS.BasicTypes import BlankType

    return BlankType(836)
def AttitudeDataRecordTrailerType(inlen):
    '''
    Attitude Data Record Trailer.
    https://www.eorc.jaxa.jp/ALOS-2/en/doc/fdata/PALSAR-2_xx_Format_CEOS_E_f.pdf
    '''

    from isce3.parsers.CEOS.BasicTypes import BlankType

    return BlankType(inlen)
Exemplo n.º 6
0
def AttitudeDataRecordTrailerType(inlen):
    '''
    Attitude Data Record Trailer.
    http://www.ga.gov.au/__data/assets/pdf_file/0019/11719/GA10287.pdf Pg: 3-42.
    '''

    from isce3.parsers.CEOS.BasicTypes import BlankType

    return BlankType(inlen)
Exemplo n.º 7
0
def CalibrationChirpReplicaType(samples, totalLength=6146):
    '''
    Calibration Data Record.
    http://www.ga.gov.au/__data/assets/pdf_file/0019/11719/GA10287.pdf Pg: 3-45.
    '''
    from isce3.parsers.CEOS.BasicTypes import (BinaryType, BlankType,
                                               IntegerType, MultiType)

    return MultiType([('ReceivePolarization', IntegerType(1)),
                      ('ChirpReplica', BinaryType('>i2', count=2 * samples)),
                      ('blanks', BlankType(totalLength - 4 * samples - 1))])