8000 campt return contains processing logs · Issue #16 · wtolson/pysis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
campt return contains processing logs #16
Open
@michaelaye

Description

@michaelaye

I'm trying to receive a clean pvl object from campt but the output is polluted by processing logs.

Here's my campt call, for reference:

pvlstr = campt(from_=fname, format='pvl', type='image', allowoutside=False,
               sample=x, line=y)

and here's the content of pvlstr, after decoding:

['campt: Working',
 '0% Processed',
 'Group = GroundPoint',
 '  Filename                   = /Volumes/Data/p4terrains/G11_022679_0981_XN_81-',
 '                               S218W/G11_022679_0981_XN_81S218W.cal.cub',
 '  Sample                     = 2500.0',
 '  Line                       = 9728.0',
 '  PixelValue                 = 0.083468907',
 '  RightAscension             = 332.06993073767',
 '  Declination                = 45.467397759472',
 '  PlanetocentricLatitude     = -81.900874169456',
 '  PlanetographicLatitude     = -81.994697096444',
 '  PositiveEast360Longitude   = 141.73099478747',
 '  PositiveEast180Longitude   = 141.73099478747',
 '  PositiveWest360Longitude   = 218.26900521253',
 '  PositiveWest180Longitude   = -141.73099478747',
 '  BodyFixedCoordinate        = (-374.02263821935, 295.05689330782,',
 '                                -3347.6867855901) <km>',
 '  LocalRadius                = 3381413.6568311 <meters>',
 '  SampleResolution           = 5.0364890282903 <meters/pixel>',
 '  LineResolution             = 5.0364890282903 <meters/pixel>',
 '',
 '  # Spacecraft Information',
 '  SpacecraftPosition         = (-349.05484937137, 341.30534280218,',
 '                                -3596.1186900101) <km>',
 '  SpacecraftAzimuth          = 179.68727531586',
 '  SlantDistance              = 253.93054305131 <km>',
 '  TargetCenterDistance       = 3629.104332688 <km>',
 '  SubSpacecraftLatitude      = -82.269103182543',
 '  SubSpacecraftLongitude     = 135.64313582454',
 '  SpacecraftAltitude         = 248.36732051168 <km>',
 '  OffNadirAngle              = 12.278580772889',
 '  SubSpacecraftGroundAzimuth = 243.29165393851',
 '',
 '  # Sun Information',
 '  SunPosition                = (29208379.379094, 196548117.44241,',
 '                                -77404100.772068) <km>',
 '  SubSolarAzimuth            = 130.66848906188',
 '  SolarDistance              = 1.4254805528648 <AU>',
 '  SubSolarLatitude           = -21.282891597047',
 '  SubSolarLongitude          = 81.547320362307',
 '  SubSolarGroundAzimuth      = 296.7532998578',
 '',
 '  # Illumination and Other',
 '  Phase                      = 57.55877071508',
 '  Incidence                  = 64.873786916827',
 '  Emission                   = 13.193650088776',
 '  NorthAzimuth               = 59.299690450996',
 '',
 '  # Time',
 '  EphemerisTime              = 359955489.5936 <seconds>',
 '  UTC                        = 2011-05-29T15:37:03.408633',
 '  LocalSolarTime             = 16.012244961677 <hour>',
 '  SolarLongitude             = 301.4927849252',
 'End_Group',
 '5% Processed',
 '10% Processed',
 '15% Processed',
 '20% Processed',
 '25% Processed',
 '30% Processed',
 '35% Processed',
 '40% Processed',
 '45% Processed',
 '50% Processed',
 '55% Processed',
 '60% Processed',
 '65% Processed',
 '70% Processed',
 '75% Processed',
 '80% Processed',
 '85% Processed',
 '90% Processed',
 '95% Processed',
 '100% Processed']

So, currently, to parse this with your pvl module I need to do hackery like this to get it to work:

pvl.loads('\n'.join(pvlstr.decode().splitlines()[2:-20]))

I'm guessing this is maybe mixing STDOUT and STDERR somehow? Or maybe not, but is there a way to get only the clean PVL object returned?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0