Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running ALE on HRSC #424

Open
thareUSGS opened this issue Jul 24, 2021 · 11 comments · Fixed by #425
Open

Running ALE on HRSC #424

thareUSGS opened this issue Jul 24, 2021 · 11 comments · Fixed by #425
Assignees
Labels
help wanted Extra attention is needed

Comments

@thareUSGS
Copy link
Contributor

I see ALE running on PDS IMG and ISIS cubes in example, but I get the same not supported error. Confused. I refreshed ALE install just in case but no luck.

ISIS 8bit cubes here and PDS3 IMGs located here:
/scratch/thare/SOCET_GXP/test_models_GXP/HRSC/Gale_Crater_orbit_h4235/stereo_images

here is how I am running ALE

import ale
import json
import os

import glob
for infile in glob.glob("*8b*.cub"):
   print(infile)
   usgscsm_str = ale.loads(infile)
   csm_isd = os.path.splitext(infile)[0] + '.json'
   with open(csm_isd, 'w') as isd_file:
        isd_file.write(usgscsm_str)

@thareUSGS thareUSGS added the help wanted Extra attention is needed label Jul 24, 2021
@jessemapel
Copy link
Contributor

HRSC wasn't matching well with ISIS for ephemeris data so we've disabled it from load(s) until it lines up better. For right now you need to manually specify the driver to generate an ISD. Here's the modified version of your code, you will need to set ISISROOT and ISISDATA for the kernel expansion to work correctly:

import ale
import json
import os

import glob
for infile in glob.glob("*8b*.cub"):
   print(infile)
   kernels = ale.util.generate_kernels_from_cube(infile, expand=True)
   with ale.drivers.mex_drivers.MexHrscIsisLabelNaifSpiceDriver(infile, props={'kernels': kernels}) as driver:
      usgscsm_isd = ale.formatters.formatter.to_isd(driver)
   usgscsm_str = json.dumps(usgscsm_isd, cls=ale.drivers.AleJsonEncoder)
   csm_isd = os.path.splitext(infile)[0] + '.json'
   with open(csm_isd, 'w') as isd_file:
        isd_file.write(usgscsm_str)

@thareUSGS
Copy link
Contributor Author

I had to get an extra kernel but I am still getting an error. I tried to debug but didn't get very far.

Traceback (most recent call last):
  File "/scratch/thare/SOCET_GXP/test_models_GXP/HRSC/Gale_Crater_orbit_h4235/stereo_images/run_ALE_cub.py", line 13, in <module>
    usgscsm_isd = ale.formatters.formatter.to_isd(driver)
  File "/home/thare/.conda/envs/ale/lib/python3.9/site-packages/ale/formatters/formatter.py", line 143, in to_isd
    'line' : driver.detector_center_line,
  File "/home/thare/.conda/envs/ale/lib/python3.9/site-packages/ale/base/data_naif.py", line 530, in detector_center_line
    return float(spice.gdpool('INS{}_BORESIGHT_LINE'.format(self.ikid), 0, 1)[0])
  File "/home/thare/.conda/envs/ale/lib/python3.9/site-packages/spiceypy/spiceypy.py", line 123, in with_errcheck
    res = f(*args, **kwargs)
  File "/home/thare/.conda/envs/ale/lib/python3.9/site-packages/spiceypy/spiceypy.py", line 143, in wrapper
    raise stypes.NotFoundError(
spiceypy.utils.exceptions.NotFoundError: Spice returns not found for function: gdpool

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Aug 9, 2021

Hm, probably missing a text kernel. The function generate_kernels_from_cube was originally written at a Starbucks with 3 PSLs in my system so it might be acting up not interacting with HRSC well.

According to the stack trace through, there might need to be a specialization for CCD center for HRSC as HRSC uses a _CCD_CENTER array and not _BORESIGHT_LINE/_BORESIGHT_SAMPLE for CCD center. It just seems odd as I recall getting a HRSC ISD successfully before.

@Kelvinrr
Copy link
Collaborator

@thareUSGS #425 got the driver running, let me know if those changes work for you.

@thareUSGS
Copy link
Contributor Author

@Kelvinrr not sure how to get the new code setup to run. For example do I still need to "you will need to set ISISROOT and ISISDATA for the kernel expansion to work correctly"

  1. I have my current Anaconda ALE environment from conda-forge
  2. Download latest "main" zip from github, unzip, "python setup.py develop"
  3. set ISIS environment up for ISIS3DATA
  4. do I still run it as Jesse stated above (link) or I stated in the first post?

I did try both, hoping I setup the environment correct and I still get 'No Such Driver for Label' (from the first methods) or from Jesse's I get:

The attempt to load "/usgs/cpkgs/isis3/data/mex/kernels/sclk/MEX_160826_STEP.TSC" by the routine FURNSH failed. It could not be located.

So I created my own ISIS3DATA area with that file and I get errors like

File "/home/thare/.conda/envs/ale/lib/python3.9/site-packages/ale/base/data_naif.py", line 530, in detector_center_line

which makes me think my environment is not ordered correctly? which is:

for p in sys.path:
... print(p)
...

/home/thare/.conda/envs/ale/lib/python39.zip
/home/thare/.conda/envs/ale/lib/python3.9
/home/thare/.conda/envs/ale/lib/python3.9/lib-dynload
/home/thare/.conda/envs/ale/lib/python3.9/site-packages
/scratch/thare/SOCET_GXP/test_models_GXP/HRSC/Gale_Crater_orbit_h4235/stereo_images/ale-master

Any tips would be appreciated.

@Kelvinrr
Copy link
Collaborator

@thareUSGS You should be running the same code that Jesse posted.

That error about the missing SCLK is so odd, we definitely do not have that SCLK kernel in our data area, but we have others. After updating the driver and testing output, I had to re-spiceinit the cubes because I encountered the same error. Were these spiceinit-ed by someone outside USGS Astro? I imagine they must of used a different SCLK that we do not have when they first spiceinit-ed the cubes?

@oleg-alexandrov
Copy link
Collaborator

In my experiments MexHrscPds3NaifSpiceDriver is working correctly, but MexHrscIsisLabelNaifSpiceDriver is not. The issue seems to come from the fact that the latter's implementation of the line_scan_rate() function does not scale the ephemeris times as expected later by the functions which do time look up. I used the latest ale code from GitHub when looking at this.

I still get a few pixel of disagreement at some locations between the ISIS and CSM models for the h4235_0001_s22 dataset. Not fully sure if it is because anything I do. It would be nice if at some point this is evaluated in knoten.

@thareUSGS
Copy link
Contributor Author

With this new report on MexHrscIsisLabelNaifSpiceDriver I will re-open this issue and hope we can get some testing in place (e.g. knoten).

@thareUSGS thareUSGS reopened this Sep 20, 2021
@ryodohemmi
Copy link

ryodohemmi commented Nov 20, 2024

I'd like to continue this issue. The latest ALE driver seems not to work for MEx SRC images (but working for HRSC images).
Their input cubes were processed by ISIS8.3.0's hrsc2isis and spiceinit. Is there any help for this?

>>> import ale
>>> ale.__version__
'0.10.0'

# ALE works well for HRSC versions 2 and 3

# HRSC Version 2
>>> test_cub = "h0010_0000_nd2.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> isd_str = ale.loads(test_cub, formatter="usgscsm", props={"kernels": kernels}, verbose=False)
# No error follows

# HRSC Version 3
>>> test_cub = "h0010_0000_nd3.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> isd_str = ale.loads(test_cub, formatter="usgscsm", props={"kernels": kernels}, verbose=False)
# No error follows

# ALE does not work for SRC versions 2 and 3

# SRC Version 2
>>> test_cub = "h0010_0023_sr2.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> isd_str = ale.loads(test_cub, formatter="usgscsm", props={"kernels": kernels}, verbose=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 190, in loads
    res = load(label, props, formatter, verbose, only_isis_spice, only_naif_spice)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 165, in load
    raise Exception('No Such Driver for Label')
Exception: No Such Driver for Label

# SRC Version 3
>>> test_cub = "h0010_0023_sr3.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> isd_str = ale.loads(test_cub, formatter="usgscsm", props={"kernels": kernels}, verbose=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 190, in loads
    res = load(label, props, formatter, verbose, only_isis_spice, only_naif_spice)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 165, in load
    raise Exception('No Such Driver for Label')
Exception: No Such Driver for Label

I also found the class of MEx SRC driver:

class MexSrcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortion, Driver):

@ryodohemmi
Copy link

ryodohemmi commented Nov 21, 2024

Here's the MEx HRSC/SRC driver's part of the output by running ale.loads with verbose=True

>>> test_cub = "h0010_0023_sr3.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> isd_str = ale.loads(test_cub, formatter="usgscsm", props={"kernels": kernels}, verbose=True)

(above omitted)

Trying <class 'ale.drivers.mex_drivers.MexHrscIsisLabelNaifSpiceDriver'>
Failed: Instrument ID is wrong.

Traceback (most recent call last):
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 154, in load
    res.instrument_id
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/mex_drivers.py", line 509, in instrument_id
    raise Exception ("Instrument ID is wrong.")
Exception: Instrument ID is wrong.
Trying <class 'ale.drivers.mex_drivers.MexHrscPds3NaifSpiceDriver'>
Failed: 'INSTRUMENT_ID'

Traceback (most recent call last):
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 154, in load
    res.instrument_id
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/mex_drivers.py", line 157, in instrument_id
    if(super().instrument_id != "HRSC"):
       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/base/label_pds3.py", line 33, in instrument_id
    return self.label['INSTRUMENT_ID']
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/pvl/collections.py", line 175, in __getitem__
    return dict_getitem(self, key)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'INSTRUMENT_ID'
Trying <class 'ale.drivers.mex_drivers.MexSrcPds3NaifSpiceDriver'>
Failed: 'INSTRUMENT_ID'

Traceback (most recent call last):
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/__init__.py", line 154, in load
    res.instrument_id
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/drivers/mex_drivers.py", line 741, in instrument_id
    if(super().instrument_id != "HRSC"):
       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/ale/base/label_pds3.py", line 33, in instrument_id
    return self.label['INSTRUMENT_ID']
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/hemmi/miniforge3/envs/isis830/lib/python3.11/site-packages/pvl/collections.py", line 175, in __getitem__
    return dict_getitem(self, key)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'INSTRUMENT_ID'

As shown above, I guess the cause of mis-loading MEx SRC images comes from the lack of ale.drivers.mex_drivers.MexSrcIsisLabelNaifSpiceDriver (ale.drivers.mex_drivers.MexSrcPds3NaifSpiceDriver only available), compared to the HRSC's case (both ale.drivers.mex_drivers.MexHrscIsisLabelNaifSpiceDriver and ale.drivers.mex_drivers.MexHrscPds3NaifSpiceDriver available)
Is there any plan to add MEx SRC ISIS driver (whose name is like ale.drivers.mex_drivers.MexSrcIsisLabelNaifSpiceDriver)?

So I changed my approach to handle it with the only available MEx SRC PDS driver, ale.drivers.mex_drivers.MexSrcIsisLabelNaifSpiceDriver.
I tested applying ale.loads() to its original PDS IMG file with ISIS-derived kernels (loaded by ale), which was successful.

>>> test_cub = "h0010_0023_sr3.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> test_img = "H0010_0023_SR3.IMG"
>>> isd_str = ale.loads(test_img, formatter="usgscsm", props={"kernels": kernels}, verbose=False)

# No error follows!

Such kind of approach is one way to handle SRC images by ale.
Also I tested running it with verbose=True, which result looks good.

>>> test_cub = "h0010_0023_sr3.cub"
>>> kernels = ale.util.generate_kernels_from_cube(test_cub, expand=True)
>>> test_img = "H0010_0023_SR3.IMG"
>>> isd_str = ale.loads(test_img, formatter="usgscsm", props={"kernels": kernels}, verbose=True)

(above omitted)

Trying <class 'ale.drivers.mex_drivers.MexSrcPds3NaifSpiceDriver'>
Success with:  <ale.drivers.mex_drivers.MexSrcPds3NaifSpiceDriver object at 0x7f76c0a81b10>
ISD:
 {
  "image_lines": 1008,
  "image_samples": 1008,
  "name_platform": "MARS EXPRESS",
  "name_sensor": "HIGH RESOLUTION STEREO CAMERA",
  "radii": {
    "semimajor": 3396.19,
    "semiminor": 3376.2,
    "unit": "km"
  },
  "sensor_position": {
    "positions": [
      [
        -18844.753986017393,
        3633823.0503813834,
        -597500.9754221125
      ]
    ],
    "velocities": [
      [
        -10.71064361516294,
        491.35109654426736,
        4432.028878037572
      ]
    ],
    "unit": "m"
  },
  "sun_position": {
    "positions": [
      [
        112430957429.882,
        186383062053.64615,
        -45622369102.37898
      ]
    ],
    "velocities": [
      [
        13193868.679184968,
        -7954072.810385375,
        8725.201637798975
      ]
    ],
    "unit": "m"
  },
  "sensor_orientation": {
    "quaternions": [
      [
        -0.44845594151481766,
        0.46624440263648237,
        -0.5325759899777893,
        -0.5457712345199095
      ]
    ]
  },
  "detector_sample_summing": 1,
  "detector_line_summing": 1,
  "focal_length_model": {
    "focal_length": 984.76
  },
  "detector_center": {
    "line": 512.0,
    "sample": 512.0
  },
  "starting_detector_line": 0,
  "starting_detector_sample": 0,
  "focal2pixel_lines": [
    0.0,
    0.0,
    111.111111111111
  ],
  "focal2pixel_samples": [
    0.0,
    111.111111111111,
    0.0
  ],
  "optical_distortion": {
    "radial": {
      "coefficients": [
        0.0,
        0.0,
        0.0
      ]
    }
  },
  "reference_height": {
    "maxheight": 1000,
    "minheight": -1000,
    "unit": "m"
  },
  "name_model": "USGS_ASTRO_FRAME_SENSOR_MODEL",
  "center_ephemeris_time": 127015396.64734519
}

BTW, do you think this is the only wayaround to process SRC images with SPICE kernels by ale, at least for the moment?

@ryodohemmi
Copy link

ryodohemmi commented Dec 3, 2024

I found another issue about the above example of loading an original img file with kernels taken via its cube.
The cube has the different ephemeris times from that of the ale's result.
The ale says like:

"ck_table_start_time": 127015396.64734519,
"ck_table_end_time": 127015396.64734519,
"spk_table_start_time": 127015396.64734519,
"spk_table_end_time": 127015396.64734519,
"spk_table_original_size": 1,
"ephemeris_times": [
  127015396.64734519

The catlab says like:

CkTableStartTime    = 127015442.00119
CkTableEndTime      = 127015442.00119
SpkTableStartTime    = 127015442.00119
SpkTableEndTime      = 127015442.00119

The difference b/w the two ephemeris times is ~46 sec.
This is probably because properties of ephemeris_start_time and ephemeris_stop_time are missing in the MexSrcPds3NaifSpiceDriver, unlike the other drivers have.

ale

>>> isd_str = ale.loads(test_img, formatter="ale", props={"kernels": kernels}, verbose=False)
>>> print(isd_str)
{
  "isis_camera_version": 1,
  "image_lines": 1008,
  "image_samples": 1008,
  "name_platform": "MARS EXPRESS",
  "name_sensor": "HIGH RESOLUTION STEREO CAMERA",
  "reference_height": {
    "maxheight": 1000,
    "minheight": -1000,
    "unit": "m"
  },
  "name_model": "USGS_ASTRO_FRAME_SENSOR_MODEL",
  "center_ephemeris_time": 127015396.64734519,
  "radii": {
    "semimajor": 3396.19,
    "semiminor": 3376.2,
    "unit": "km"
  },
  "body_rotation": {
    "time_dependent_frames": [
      10014,
      1
    ],
    "ck_table_start_time": 127015396.64734519,
    "ck_table_end_time": 127015396.64734519,
    "ck_table_original_size": 1,
    "ephemeris_times": [
      127015396.64734519
    ],
    "quaternions": [
      [
        0.04598506398809,
        0.2246409766576803,
        -0.22545165605830253,
        0.9468861369123871
      ]
    ],
    "angular_velocities": [
      [
        3.162434532527514e-05,
        -2.8798992833710347e-05,
        5.652258189188276e-05
      ]
    ],
    "reference_frame": 1
  },
  "instrument_pointing": {
    "time_dependent_frames": [
      -41001,
      1
    ],
    "ck_table_start_time": 127015396.64734519,
    "ck_table_end_time": 127015396.64734519,
    "ck_table_original_size": 1,
    "ephemeris_times": [
      127015396.64734519
    ],
    "quaternions": [
      [
        0.1749106389908213,
        0.15528890661602537,
        0.4437283631709852,
        0.8650992796017232
      ]
    ],
    "angular_velocities": [
      [
        -0.00106162784061926,
        -0.0002641893261326531,
        0.0005171708451557637
      ]
    ],
    "reference_frame": 1,
    "constant_frames": [
      -41220,
      -41200,
      -41000,
      -41001
    ],
    "constant_rotation": [
      0.0006632249171651949,
      0.9999987020873514,
      -0.0014683175140289342,
      -0.9999995539429968,
      0.0006622366189151796,
      -0.0006734660111232121,
      -0.0006724927633971734,
      0.001468763518515065,
      0.9999986952427538
    ]
  },
  "naif_keywords": {
    "BODY499_RADII": [
      3396.19,
      3396.19,
      3376.2
    ],
    "BODY_FRAME_CODE": 10014,
    "BODY_CODE": 499,
    "INS-41220_PIXEL_SIZE": [
      9.0,
      9.0
    ],
    "INS-41220_FOV_CROSS_ANGLE": 0.27,
    "INS-41220_BORESIGHT_SAMPLE": 512.5,
    "INS-41220_FOV_REF_ANGLE": 0.27,
    "INS-41220_TRANSX": [
      0.0,
      0.009,
      0.0
    ],
    "INS-41220_TRANSY": [
      0.0,
      0.0,
      0.009
    ],
    "FRAME_-41220_CLASS_ID": -41220.0,
    "INS-41220_PIXEL_LINES": 1024.0,
    "INS-41220_CCD_CENTER": [
      512.5,
      512.5
    ],
    "INS-41220_PLATFORM_ID": -41000.0,
    "TKFRAME_-41220_RELATIVE": "MEX_HRSC_BASE",
    "INS-41220_ITRANSL": [
      0.0,
      0.0,
      111.111111111111
    ],
    "INS-41220_ITRANSS": [
      0.0,
      111.111111111111,
      0.0
    ],
    "INS-41220_BORESIGHT": [
      0.0,
      0.0,
      984.76
    ],
    "INS-41220_FOV_ANGULAR_SIZE": [
      0.0094,
      0.0094
    ],
    "INS-41220_FOV_CLASS_SPEC": "ANGLES",
    "INS-41220_IFOV": 9.14e-06,
    "INS-41220_FOV_REF_VECTOR": [
      1.0,
      0.0,
      0.0
    ],
    "FRAME_-41220_CLASS": 4.0,
    "INS-41220_FOV_SHAPE": "RECTANGLE",
    "INS-41220_PIXEL_SAMPLES": 1024.0,
    "INS-41220_CK_REFERENCE_ID": 1.0,
    "INS-41220_PIXEL_PITCH": 0.009,
    "INS-41220_BORESIGHT_LINE": 512.5,
    "INS-41220_FOCAL_LENGTH": 984.76,
    "INS-41220_FOV_ANGLE_UNITS": "DEGREES",
    "INS-41220_F/RATIO": 9.2,
    "INS-41220_FOV_FRAME": "MEX_HRSC_SRC",
    "FRAME_-41220_NAME": "MEX_HRSC_SRC",
    "TKFRAME_-41220_ANGLES": [
      -0.084154,
      -0.038531,
      90.038
    ],
    "INS-41220_CK_FRAME_ID": -41001.0,
    "FRAME_-41220_CENTER": -41200.0,
    "TKFRAME_-41220_AXES": [
      1.0,
      2.0,
      3.0
    ],
    "TKFRAME_-41220_SPEC": "ANGLES",
    "TKFRAME_-41220_UNITS": "DEGREES",
    "BODY499_POLE_DEC": [
      52.8865,
      -0.0609,
      0.0
    ],
    "BODY499_POLE_RA": [
      317.68143,
      -0.1061,
      0.0
    ],
    "BODY499_PM": [
      176.63,
      350.89198226,
      0.0
    ]
  },
  "detector_sample_summing": 1,
  "detector_line_summing": 1,
  "focal_length_model": {
    "focal_length": 984.76
  },
  "detector_center": {
    "line": 512.0,
    "sample": 512.0
  },
  "focal2pixel_lines": [
    0.0,
    0.0,
    111.111111111111
  ],
  "focal2pixel_samples": [
    0.0,
    111.111111111111,
    0.0
  ],
  "optical_distortion": {
    "radial": {
      "coefficients": [
        0.0,
        0.0,
        0.0
      ]
    }
  },
  "starting_detector_line": 0,
  "starting_detector_sample": 0,
  "instrument_position": {
    "spk_table_start_time": 127015396.64734519,
    "spk_table_end_time": 127015396.64734519,
    "spk_table_original_size": 1,
    "ephemeris_times": [
      127015396.64734519
    ],
    "positions": [
      [
        -301.33667654827565,
        -3002.7406414312904,
        -2110.634347661829
      ]
    ],
    "velocities": [
      [
        2.2104769081410343,
        -2.1882970971365943,
        3.2062624534366946
      ]
    ],
    "reference_frame": 1
  },
  "sun_position": {
    "spk_table_start_time": 127015396.64734519,
    "spk_table_end_time": 127015396.64734519,
    "spk_table_original_size": 1,
    "ephemeris_times": [
      127015396.64734519
    ],
    "positions": [
      [
        -123610491.75355302,
        -169290951.16735008,
        -74308725.95399317
      ]
    ],
    "velocities": [
      [
        19.2183285857141,
        -13.9337871854119,
        -6.91036204155162
      ]
    ],
    "reference_frame": 1
  }
}

catlab

Object = IsisCube
  Object = Core
    StartByte   = 65537
    Format      = Tile
    TileSamples = 1008
    TileLines   = 1008

    Group = Dimensions
      Samples = 1008
      Lines   = 1008
      Bands   = 1
    End_Group

    Group = Pixels
      Type       = SignedWord
      ByteOrder  = Lsb
      Base       = 0.0
      Multiplier = 1.0
    End_Group
  End_Object

  Group = Instrument
    SpacecraftName            = "MARS EXPRESS"
    InstrumentId              = SRC
    StartTime                 = 2004-01-10T14:02:57.817
    StopTime                  = 2004-01-10T14:02:57.820
    SpacecraftClockStartCount = 1/0021823325.32303
    SpacecraftClockStopCount  = 1/0021823574.56834
    MissionPhaseName          = MC_Phase_0
    TargetName                = Mars
    ExposureDuration          = 3.024 <ms>
    InstrumentTemperature     = 14.2424 <degC>
  End_Group

  Group = Archive
    DataSetId   = MEX-M-HRSC-3-RDR-V4.0
    DetectorId  = MEX_HRSC_SRC
    EventType   = MARS-REGIONAL-MAPPING-Vo-Im-Tc
    OrbitNumber = 10
    ProductId   = H0010_0023_SR3.IMG
  End_Group

  Group = BandBin
    Width  = 250.0 <nm>
    Center = 600.0 <nm>
  End_Group

  Group = Kernels
    NaifIkCode                = -41220
    LeapSecond                = $base/kernels/lsk/naif0012.tls
    TargetAttitudeShape       = $base/kernels/pck/pck00009.tpc
    TargetPosition            = (Table, $base/kernels/spk/de430.bsp,
                                 $base/kernels/spk/mar097.bsp)
    InstrumentPointing        = (Table,
                                 $mex/kernels/ck/ATNM_MEASURED_040101_050101_V-
                                 03.BC, $mex/kernels/fk/MEX_V16.TF)
    Instrument                = $mex/kernels/ik/MEX_HRSC_V09.TI
    SpacecraftClock           = $mex/kernels/sclk/MEX_241018_STEP.TSC
    InstrumentPosition        = (Table,
                                 $mex/kernels/spk/ORMM__031222180906_00052.BSP)
    InstrumentAddendum        = $mex/kernels/iak/hrscsrcAddendum002.ti
    ShapeModel                = /home/hemmi/src/ernst2023/phobos_g_018m_spc_0-
                                000n00000_v002.bds
    InstrumentPositionQuality = Reconstructed
    InstrumentPointingQuality = Reconstructed
    CameraVersion             = 2
    Source                    = isis
  End_Group
End_Object

Object = Label
  Bytes = 65536
End_Object

Object = Table
  Name                = InstrumentPointing
  StartByte           = 2104801
  Bytes               = 64
  Records             = 1
  ByteOrder           = Lsb
  TimeDependentFrames = (-41001, 1)
  ConstantFrames      = (-41220, -41200, -41000, -41001)
  ConstantRotation    = (6.63224917165212e-04, 0.99999870208735,
                         -0.0014683175140289, -0.999999553943,
                         6.62236618915141e-04, -6.73466011123212e-04,
                         -6.72492763397173e-04, 0.0014687635185151,
                         0.99999869524275)
  CkTableStartTime    = 127015442.00119
  CkTableEndTime      = 127015442.00119
  CkTableOriginalSize = 1
  FrameTypeCode       = 3
  Description         = "Created by spiceinit"
  Kernels             = ($mex/kernels/ck/ATNM_MEASURED_040101_050101_V03.BC,
                         $mex/kernels/fk/MEX_V16.TF)

  Group = Field
    Name = J2000Q0
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q1
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q2
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q3
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV1
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV2
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV3
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = ET
    Type = Double
    Size = 1
  End_Group
End_Object

Object = Table
  Name                 = InstrumentPosition
  StartByte            = 2104865
  Bytes                = 56
  Records              = 1
  ByteOrder            = Lsb
  CacheType            = Linear
  SpkTableStartTime    = 127015442.00119
  SpkTableEndTime      = 127015442.00119
  SpkTableOriginalSize = 1.0
  Description          = "Created by spiceinit"
  Kernels              = $mex/kernels/spk/ORMM__031222180906_00052.BSP

  Group = Field
    Name = J2000X
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Y
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Z
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000XV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000YV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000ZV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = ET
    Type = Double
    Size = 1
  End_Group
End_Object

Object = Table
  Name                = BodyRotation
  StartByte           = 2104921
  Bytes               = 64
  Records             = 1
  ByteOrder           = Lsb
  TimeDependentFrames = (10014, 1)
  CkTableStartTime    = 127015442.00119
  CkTableEndTime      = 127015442.00119
  CkTableOriginalSize = 1
  FrameTypeCode       = 2
  PoleRa              = (317.68143, -0.1061, 0.0)
  PoleDec             = (52.8865, -0.0609, 0.0)
  PrimeMeridian       = (176.63, 350.89198226, 0.0)
  Description         = "Created by spiceinit"
  Kernels             = ($base/kernels/spk/de430.bsp,
                         $base/kernels/spk/mar097.bsp,
                         $base/kernels/pck/pck00009.tpc)
  SolarLongitude      = 331.18875626841

  Group = Field
    Name = J2000Q0
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q1
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q2
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Q3
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV1
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV2
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = AV3
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = ET
    Type = Double
    Size = 1
  End_Group
End_Object

Object = Table
  Name                 = SunPosition
  StartByte            = 2104985
  Bytes                = 56
  Records              = 1
  ByteOrder            = Lsb
  CacheType            = Linear
  SpkTableStartTime    = 127015442.00119
  SpkTableEndTime      = 127015442.00119
  SpkTableOriginalSize = 1.0
  Description          = "Created by spiceinit"
  Kernels              = ($base/kernels/spk/de430.bsp,
                          $base/kernels/spk/mar097.bsp)

  Group = Field
    Name = J2000X
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Y
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000Z
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000XV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000YV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = J2000ZV
    Type = Double
    Size = 1
  End_Group

  Group = Field
    Name = ET
    Type = Double
    Size = 1
  End_Group
End_Object

Object = History
  Name      = IsisCube
  StartByte = 2105041
  Bytes     = 1367
End_Object

Object = OriginalLabel
  Name      = IsisCube
  StartByte = 2098074
  Bytes     = 6727
End_Object

Object = NaifKeywords
  BODY_CODE              = 499
  BODY499_RADII          = (3396.19, 3396.19, 3376.2)
  BODY_FRAME_CODE        = 10014
  INS-41220_FOCAL_LENGTH = 984.76
  INS-41220_PIXEL_SIZE   = 9.0
  INS-41220_TRANSX       = (0.0, 0.009, 0.0)
  INS-41220_TRANSY       = (0.0, 0.0, 0.009)
  INS-41220_ITRANSS      = (0.0, 111.11111111111, 0.0)
  INS-41220_ITRANSL      = (0.0, 0.0, 111.11111111111)
  INS-41220_CCD_CENTER   = (512.5, 512.5)
End_Object
End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants