Skip to content
Snippets Groups Projects
Commit 1c216579 authored by Rodriguez, Kelvin's avatar Rodriguez, Kelvin
Browse files

Merge branch 'image-to-ground-tutorial' into 'main'

CSM Stack - Image to ground tutorial

See merge request astrogeology/asc-public-docs!6
parents 1d620e4f 61cd3915
No related branches found
No related tags found
No related merge requests found
Showing
with 8066 additions and 3 deletions
......@@ -138,6 +138,15 @@
{{ super() }}
{% endblock %}
{% block content %}
{% if page.nb_url %}
<a href="{{ page.nb_url }}" title="Download Notebook" class="md-content__button md-icon">
{% include ".icons/material/download.svg" %}
</a>
{% endif %}
{{ super() }}
{% endblock content %}
{% block footer %}
......@@ -211,7 +220,6 @@
</footer>
{% endblock %}
{% block styles %}
......
%% Cell type:markdown id:a117baed-ab98-4499-832c-8c73a8606cc0 tags:
# Getting Started: Instantiating a CSM Camera Model from Image
%% Cell type:markdown id:3602c014-53bc-4330-a9b0-0848d4927458 tags:
### 1. Install dependencies
The `knoten` installation may take a little longer than usual due to the many dependencies (including ALE) involved.
%% Cell type:markdown id:ffeccab3-0d5d-4609-9c7f-871bdb69f17a tags:
```
conda install -c conda-forge knoten=0.2.1
```
%% Cell type:markdown id:faed4a43-cd06-45c7-bfa1-793978d41486 tags:
### 2. Generate an ISD from a Cube
We will use MRO data located in the `data/image_to_ground` folder containing a cube and necessary kernels for ISD (Image Support Data) generation.
*Note*: If your cube already has attached spice data, do you not have to specify kernels in the `props` param and can pass in an empty dict `{}` instead.
%% Cell type:code id:7f58cb34-d27f-456d-bfb5-f9075ca575b3 tags:
``` python
import ale
import json
import knoten
import os
# Set local data directory and paths
data_dir = '../data/image_to_ground'
cube_file = os.path.join(data_dir, 'B10_013341_1010_XN_79S172W.cub')
isd_file = os.path.join(data_dir, 'isd_file.json')
# Set local kernel paths
props = {
'kernels': [
os.path.join(data_dir, 'B10_013341_1010_XN_79S172W_0.bsp'),
os.path.join(data_dir, 'B10_013341_1010_XN_79S172W_1.bsp'),
os.path.join(data_dir, 'mro_ctx_v11.ti'),
os.path.join(data_dir, 'mro_sc_psp_090526_090601_0_sliced_-74000.bc'),
os.path.join(data_dir, 'mro_sc_psp_090526_090601_1_sliced_-74000.bc'),
os.path.join(data_dir, 'mro_sclkscet_00082_65536.tsc'),
os.path.join(data_dir, 'mro_v16.tf'),
os.path.join(data_dir, 'naif0012.tls'),
os.path.join(data_dir, 'pck00008.tpc')
]
}
# Generate the ISD string from the cube's label
isd_str = ale.loads(
label=cube_file,
formatter="ale",
props=props,
indent=2,
verbose=False,
only_isis_spice=False,
only_naif_spice=False
)
# Write the ISD string to file 'isd_file.json'
with open(isd_file, "w") as file:
file.write(isd_str)
```
%% Output
/Users/chkim/mambaforge3/envs/test/lib/python3.12/site-packages/osgeo/gdal.py:287: FutureWarning: Neither gdal.UseExceptions() nor gdal.DontUseExceptions() has been explicitly called. In GDAL 4.0, exceptions will be enabled by default.
warnings.warn(
%% Cell type:markdown id:4ed327aa-bffc-4316-b42f-496d9e07465e tags:
### 3. Create a Community Sensor Model
We will use Knoten's implementation of CSM as the library supports line scanner types of sensor models in the usgscsm library.
%% Cell type:code id:0c4dbf84-2986-495b-9e4a-da4c77059e7e tags:
``` python
sensor_model = knoten.csm.create_csm(isd_file, verbose=False)
```
%% Cell type:markdown id:d6973fe3-9d4a-4408-9310-50334a52ff58 tags:
### 4. Convert image coordinates into ground coordinates
%% Cell type:code id:d8f2b155-9803-4a6b-a967-bca1ef35860f tags:
``` python
# Create an image coordinate at line = 206 and sample = 206
image_coord = knoten.csmapi.ImageCoord(206, 206)
# Convert the image coordinates to ground coordinates with desired precision of 0.0
ground_coord = sensor_model.imageToGround(image_coord, 0.0)
# Output the ground coordinates
ground_coord.x, ground_coord.y, ground_coord.z
```
%% Output
(-572485.2147483829, -79884.88742005036, -3326939.6184008163)
%% Cell type:markdown id:bf87c5a5-b26c-4168-9324-ce5b0004cc7c tags:
### 5. Convert ground coordinates into image coordinates
%% Cell type:code id:0edc0b6d-cdbe-46a8-9fdc-4ebdc4570f1a tags:
``` python
# Convert the image coordinates to ground coordinates with desired precision of 0.0
image_coord = sensor_model.groundToImage(ground_coord, 0.0)
# Output the image coordinates
image_coord.line, image_coord.samp
```
%% Output
(205.99991086761267, 206.00000010379927)
File added
File added
File added
{
"isis_camera_version": 1,
"image_lines": 1,
"image_samples": 1,
"name_platform": "Mars_Reconnaissance_Orbiter",
"name_sensor": "CONTEXT CAMERA",
"reference_height": {
"maxheight": 1000,
"minheight": -1000,
"unit": "m"
},
"name_model": "USGS_ASTRO_LINE_SCANNER_SENSOR_MODEL",
"interpolation_method": "lagrange",
"line_scan_rate": [
[
0.5,
-0.0009385347366333008,
0.001877
]
],
"starting_ephemeris_time": 297088762.24158406,
"center_ephemeris_time": 297088762.2425226,
"radii": {
"semimajor": 3396.19,
"semiminor": 3376.2,
"unit": "km"
},
"body_rotation": {
"time_dependent_frames": [
10014,
1
],
"ck_table_start_time": 297088762.24158406,
"ck_table_end_time": 297088762.2434611,
"ck_table_original_size": 2,
"ephemeris_times": [
297088762.24158406,
297088762.2434611
],
"quaternions": [
[
0.8371209459443085,
-0.2996928944391797,
-0.10720760458181891,
-0.44488113064480633
],
[
0.8371209163489989,
-0.29969290157106665,
-0.10720758464502428,
-0.4448811863335056
]
],
"angular_velocities": [
[
3.16238646979841e-05,
-2.880432898124293e-05,
5.652013165872617e-05
],
[
3.162386469798407e-05,
-2.8804328981243005e-05,
5.6520131658726145e-05
]
],
"reference_frame": 1
},
"instrument_pointing": {
"time_dependent_frames": [
-74000,
-74900,
1
],
"ck_table_start_time": 297088762.24158406,
"ck_table_end_time": 297088762.2434611,
"ck_table_original_size": 2,
"ephemeris_times": [
297088762.24158406,
297088762.2434611
],
"quaternions": [
[
0.42061124835443375,
0.1860622266332136,
-0.23980124331599867,
0.8549633847610767
],
[
0.42061139037319234,
0.18606299339177235,
-0.23980084659599213,
0.8549632592984735
]
],
"angular_velocities": [
[
-0.0006409728984903078,
0.0005054077299115119,
0.00047182679484680703
],
[
-0.000640980988402087,
0.0005053310202622464,
0.0004719397475515134
]
],
"reference_frame": 1,
"constant_frames": [
-74021,
-74020,
-74699,
-74690,
-74000
],
"constant_rotation": [
0.9999995608798441,
-1.5196024192803473e-05,
0.0009370214510594065,
1.5276552075356666e-05,
0.9999999961910578,
-8.593317911879534e-05,
-0.0009370201416476771,
8.594745584079715e-05,
0.9999995573030465
]
},
"naif_keywords": {
"BODY499_RADII": [
3396.19,
3396.19,
3376.2
],
"BODY_FRAME_CODE": 10014,
"BODY_CODE": 499,
"INS-74021_FOV_ANGLE_UNITS": "DEGREES",
"TKFRAME_-74021_UNITS": "DEGREES",
"INS-74021_FOV_ANGULAR_SIZE": [
5.73,
0.001146
],
"INS-74021_PIXEL_LINES": 1.0,
"TKFRAME_-74021_ANGLES": [
0.0,
0.0,
0.0
],
"INS-74021_IFOV": [
2e-05,
2e-05
],
"FRAME_-74021_CENTER": -74.0,
"INS-74021_F/RATIO": 3.25,
"INS-74021_PLATFORM_ID": -74000.0,
"INS-74021_CCD_CENTER": [
2500.5,
0.5
],
"INS-74021_PIXEL_SAMPLES": 5000.0,
"INS-74021_FOCAL_LENGTH": 352.9271664,
"INS-74021_FOV_CROSS_ANGLE": 0.00057296,
"INS-74021_TRANSX": [
0.0,
0.0,
0.007
],
"INS-74021_FOV_CLASS_SPEC": "ANGLES",
"INS-74021_TRANSY": [
0.0,
0.007,
0.0
],
"INS-74021_FOV_REF_VECTOR": [
0.0,
1.0,
0.0
],
"INS-74021_BORESIGHT": [
0.0,
0.0,
1.0
],
"FRAME_-74021_NAME": "MRO_CTX",
"INS-74021_PIXEL_PITCH": 0.007,
"TKFRAME_-74021_AXES": [
1.0,
2.0,
3.0
],
"TKFRAME_-74021_SPEC": "ANGLES",
"INS-74021_BORESIGHT_LINE": 0.430442527,
"INS-74021_FOV_SHAPE": "RECTANGLE",
"INS-74021_BORESIGHT_SAMPLE": 2543.46099,
"FRAME_-74021_CLASS": 4.0,
"INS-74021_CK_FRAME_ID": -74000.0,
"INS-74021_ITRANSL": [
0.0,
142.85714285714,
0.0
],
"INS-74021_FOV_REF_ANGLE": 2.86478898,
"INS-74021_ITRANSS": [
0.0,
0.0,
142.85714285714
],
"FRAME_-74021_CLASS_ID": -74021.0,
"INS-74021_OD_K": [
-0.0073433925920054505,
2.8375878636241697e-05,
1.2841989124027099e-08
],
"INS-74021_FOV_FRAME": "MRO_CTX",
"INS-74021_CK_REFERENCE_ID": -74900.0,
"TKFRAME_-74021_RELATIVE": "MRO_CTX_BASE",
"INS-74021_PIXEL_SIZE": [
0.007,
0.007
],
"SCLK_PARTITION_END_74999": [
52973626698957.0,
56987144678331.0,
58187590527162.99,
60316687182323.0,
60877152115000.0,
61228279788693.0,
61339176915162.99,
61899057915627.0,
63521451859691.0,
65622287643263.0
],
"SCLK01_N_FIELDS_74999": 2.0,
"SCLK01_OUTPUT_DELIM_74999": 1.0,
"BODY499_POLE_DEC": [
52.8865,
-0.0609,
0.0
],
"SCLK01_OFFSETS_74999": [
0.0,
0.0
],
"SCLK_DATA_TYPE_74999": 1.0,
"SCLK01_COEFFICIENTS_74999": [
0.0,
-631195148.816,
1.0,
3097283854336.0,
-583934347.816,
1.0,
5164027215872.0,
-552398346.816,
1.0,
7230770577408.0
],
"SCLK01_TIME_SYSTEM_74999": 2.0,
"SCLK_PARTITION_START_74999": [
0.0,
52973626982399.99,
56987144683520.0,
58187590533120.0,
60316687204352.01,
60877152124927.99,
61228279791616.0,
61339176927232.0,
61899057922048.0,
63521451868160.0
],
"BODY499_POLE_RA": [
317.68143,
-0.1061,
0.0
],
"BODY499_PM": [
176.63,
350.89198226,
0.0
],
"SCLK01_MODULI_74999": [
4294967296.0,
65536.0
]
},
"detector_sample_summing": 1,
"detector_line_summing": 1,
"focal_length_model": {
"focal_length": 352.9271664
},
"detector_center": {
"line": 0.430442527,
"sample": 2542.96099
},
"focal2pixel_lines": [
0.0,
142.85714285714,
0.0
],
"focal2pixel_samples": [
0.0,
0.0,
142.85714285714
],
"optical_distortion": {
"radial": {
"coefficients": [
-0.0073433925920054505,
2.8375878636241697e-05,
1.2841989124027099e-08
]
}
},
"starting_detector_line": 0,
"starting_detector_sample": 0,
"instrument_position": {
"spk_table_start_time": 297088762.24158406,
"spk_table_end_time": 297088762.2434611,
"spk_table_original_size": 2,
"ephemeris_times": [
297088762.24158406,
297088762.2434611
],
"positions": [
[
-1885.2980675616832,
913.1652236013313,
-2961.966828003069
],
[
-1885.3017519980372,
913.1599537256885,
-2961.9661251204225
]
],
"velocities": [
[
-1.9629237646703679,
-2.80759072221274,
0.374466578014853
],
[
-1.962920608078827,
-2.8075922570664513,
0.37447154183051934
]
],
"reference_frame": 1
},
"sun_position": {
"spk_table_start_time": 297088762.24158406,
"spk_table_end_time": 297088762.2434611,
"spk_table_original_size": 2,
"ephemeris_times": [
297088762.24158406,
297088762.2434611
],
"positions": [
[
-208246643.00357288,
-7677078.09368972,
2103553.070434021
],
[
-208246643.00396734,
-7677078.138553765,
2103553.04986676
]
],
"velocities": [
[
-0.2102027789950371,
-23.901883559526876,
-10.957471328254789
],
[
-0.21020277326198994,
-23.90188355931826,
-10.957471328315325
]
],
"reference_frame": 1
}
}
\ No newline at end of file
KPL/IK
\beginlabel
PDS_VERSION_ID = PDS3
RECORD_TYPE = STREAM
RECORD_BYTES = "N/A"
^SPICE_KERNEL = "mro_ctx_v11.ti"
MISSION_NAME = "MARS RECONNAISSANCE ORBITER"
SPACECRAFT_NAME = "MARS RECONNAISSANCE ORBITER"
DATA_SET_ID = "MRO-M-SPICE-6-V1.0"
KERNEL_TYPE_ID = IK
PRODUCT_ID = "mro_ctx_v11.ti"
PRODUCT_CREATION_TIME = 2012-08-23T16:12:39
PRODUCER_ID = "NAIF/JPL"
MISSION_PHASE_NAME = "N/A"
PRODUCT_VERSION_TYPE = ACTUAL
PLATFORM_OR_MOUNTING_NAME = "MRO SPACECRAFT"
START_TIME = "N/A"
STOP_TIME = "N/A"
SPACECRAFT_CLOCK_START_COUNT = "N/A"
SPACECRAFT_CLOCK_STOP_COUNT = "N/A"
TARGET_NAME = MARS
INSTRUMENT_NAME = "CONTEXT CAMERA"
NAIF_INSTRUMENT_ID = -74021
SOURCE_PRODUCT_ID = "N/A"
NOTE = "See comments in the file for details"
OBJECT = SPICE_KERNEL
INTERCHANGE_FORMAT = ASCII
KERNEL_TYPE = INSTRUMENT
DESCRIPTION = "MRO SPICE IK file for Context Camera (CTX)
providing FOV definition and other geometric parameters for the instrument,
created by NAIF, JPL with input from USGS, Flagstaff. "
END_OBJECT = SPICE_KERNEL
\endlabel
CTX Instrument kernel
===========================================================================
This instrument kernel (I-kernel) contains MRO Context Camera (CTX)
optics, detector, and field-of-view parameters.
Version and Date
---------------------------------------------------------------------------
Version 1.1 -- August 23, 2012 -- Boris Semenov, NAIF/JPL
Replaced ``mroctxAddendum001.ti'' with ``mroctxAddendum005.ti''.
Version 1.0 -- June 7, 2007 -- Boris Semenov, NAIF/JPL
Initial release.
References
---------------------------------------------------------------------------
1. ``Kernel Pool Required Reading''
2. ``C-kernel Required Reading''
3. MRO Frames Definition Kernel (FK), latest version.
4. MRO CTX CDR Package, March 20, 2003.
5. ``mroctxAddendum005.ti'' IK file by USGS, Flagstaff, included
``as is'' at the bottom of this IK.
6. CTX Description, MSSS Web Site,
http://www.msss.com/mro/ctx/ctx_description.html
Implementation Notes
--------------------------------------------------------
Applications that need SPICE I-kernel data must ``load'' the I-kernel
file, normally during program initialization.
Loading the kernel using the SPICELIB routine FURNSH causes the data
items and their associated values present in the kernel to become
associated with a data structure called the ``kernel pool''. The
application program may then obtain the value(s) for any IK data
item using the SPICELIB routines GDPOOL, GIPOOL, GCPOOL. Routine
GETFOV may be used if the file contains instrument field-of-view
(FOV) specification. See [1] for details.
This file was created with, and can be updated with a text editor or
word processor.
Conventions for Specifying Data
--------------------------------------------------------
Data items are specified using ``keyword=value'' assignments [1].
All keywords referencing values in this I-kernel start with the
characters `INS' followed by the NAIF MRO instrument ID code,
constructed using the spacecraft ID number (-74) followed by the
NAIF three digit ID number for CTX (021). This ID is defined in [3]
as follows:
Instrument name ID
-------------------- -------
MRO_CTX -74021
The remainder of the keyword is an underscore character followed by
the unique name of the data item. For example, the focal length of
the CTX is specified by
INS-74021_FOCAL_LENGTH
The upper bound on the length of all keywords is 32 characters.
If a keyword is included in more than one file, or if the same
keyword appears more than once within a single file, the last
assignment supersedes any earlier assignments.
Overview
--------------------------------------------------------
From [5]:
From its 3 p.m. circular, polar orbit, the MRO Context Camera
(CTX) will obtain grayscale (black-and-white) images of the
martian surface with a spatial resolution of about 6 meters (20
feet) per pixel over a swath that is about 30 kilometers (18.6
miles) wide. CTX is a Facility Instrument, operated by Malin
Space Science Systems and the MRO MARCI science team.
As its name implies, CTX will provide context for images acquired
by other instruments onboard the Mars Reconnaissance Orbiter,
particularly the High Resolution Imaging Science Experiment
(HiRISE) and the Compact Reconnaissance Imaging Spectrometer for
Mars (CRISM).
The instrument consists of a 350 mm focal length, 6 degree field
of view, catadioptric Cassegrain (Maksutov-type) telescope that
images onto a 5064 pixels-wide charge coupled device (CDD) line
array. The CCD detects a broad band of visible light from 500 to
800 nanometers in wavelength. The instrument includes a 256 MB
DRAM buffer, so that it can acquire pictures that have downtrack
lengths greater than 160 kilometers (99 miles). In other words, a
typical CTX image can be as wide as 30 km and as long as 160 km,
or more.
Mounting Alignment
--------------------------------------------------------
Refer to the latest version of the MRO Frames Definition Kernel
(FK) [3] for the CTX reference frame definitions and mounting
alignment information.
Apparent FOV Layout
--------------------------------------------------------
This diagram illustrates the CTX apparent FOV layout in the
corresponding reference frame and the CCD corner based pixel
scheme:
^
| direction of
| flight
|
^ +Xctx (along track)
|
| |
| ~0.001146 degrees |
| |
v Pixel 1 | Pixel 5000
--- +---------|---------+
| 1 line | 2500.5x-------------> +Yctx (cross track)
--- +-------------------+
^ 5000 pixels/line
|
| ~5.73 degrees |
|<----------------->|
| | Boresight (+Zctx axis)
is into the page
This diagram illustrates the CCD center based pixel scheme used in
USGS ISIS 3 camera model ([5]):
^
| direction of
| flight
|
^ +Xctx (along track)
|
| |
| ~0.001146 degrees |
| |
v Pixel -2499.5 | Pixel 2499.5
--- +---------|---------+
| 1 line | 0 x-------------> +Yctx (cross track)
--- +-------------------+
^ 5000 pixels/line
|
| ~5.73 degrees |
|<----------------->|
| | Boresight (+Zctx axis)
is into the page
Optical Parameters
--------------------------------------------------------
The following CTX nominal first order optical parameters are included
in the data section below, from [4]:
-----------------------------------------------------------------
Parameter
-----------------------------------------------------------------
Focal Length, mm 350.0
f/ratio 3.25
IFOV, rad/pixel
Cross-track 0.00002
Along-track 0.00002
Field of view (deg)
Cross-track 5.73
Along-track 0.001146
-----------------------------------------------------------------
The keywords below provide nominal values from the table above.
Angular size values in the keywords are given radians, with the
cross-track size being the first value and the along-track size
being the second value in each pair.
The nominal focal length is omitted from this set because an updated
value for it included in [5] is provided later in this file.
\begindata
INS-74021_F/RATIO = ( 3.25 )
INS-74021_FOV_ANGULAR_SIZE = ( 5.73, 0.001146 )
INS-74021_IFOV = ( 0.00002, 0.00002 )
\begintext
Detector Parameters
--------------------------------------------------------
The nominal CTX detector parameters from [4] are:
-----------------------------------------------------------------
Parameter
-----------------------------------------------------------------
Detector Array Size
Cross-track 5000
Along-track 1
Detector Array Center
Cross-track 2500.5
Along-track 0.5
Pixel Size, microns
Cross-track 7
Along-track 7
-----------------------------------------------------------------
The values are given in millimeters for PIXEL_SIZE keywords and in counts
for PIXEL_SAMPLES, PIXEL_LINES, and CENTER keywords.
\begindata
INS-74021_PIXEL_SIZE = ( 0.007, 0.007 )
INS-74021_PIXEL_SAMPLES = ( 5000 )
INS-74021_PIXEL_LINES = ( 1 )
INS-74021_CCD_CENTER = ( 2500.5, 0.5 )
\begintext
FOV Definition
---------------------------------------------------------------------------
This section contains definitions for the CTX FOV. These
definitions are provided in the format required by the SPICE
(CSPICE) function GETFOV (getfov_c).
The set of assignments in the data section below defines the
CTX FOV with respect to the CTX instrument frame to be a rectangles
with the corners defined by the first and last pixels of CCD line
array and the boresight along the +Z axis. This FOV definition uses
angular extent style specification with the cross and along track
angular sizes taken from the ``Optics Parameters'' section above.
\begindata
INS-74021_FOV_FRAME = 'MRO_CTX'
INS-74021_FOV_SHAPE = 'RECTANGLE'
INS-74021_BORESIGHT = (
0.000000 0.000000 1.000000
)
INS-74021_FOV_CLASS_SPEC = 'ANGLES'
INS-74021_FOV_REF_VECTOR = (
0.000000 1.000000 0.000000
)
INS-74021_FOV_REF_ANGLE = ( 2.86478898 )
INS-74021_FOV_CROSS_ANGLE = ( 0.00057296 )
INS-74021_FOV_ANGLE_UNITS = 'DEGREES'
\begintext
Optical Distortion
--------------------------------------------------------
See ``mroctxAddendum005.ti'' below.
Platform ID
---------------------------------------------------------------------------
This number is the NAIF instrument ID of the platform on which the
instrument is mounted. CTX is mounted on the spacecraft bus.
\begindata
INS-74021_PLATFORM_ID = ( -74000 )
\begintext
MROCTX Instrument Kernel ``mroctxAddendum005.ti''
=============================================================
This instrument kernel (I-kernel) contains parameters that describe
the Mars Reconnaissance Orbiter CTX instrument model used by UGSG's
ISIS 3.
This model is defined with respect to the MRO_CTX frame.
``mroctxAddendum005.ti'' Version and Date
-------------------------------------------------------------
Version 1.0 -- December 12, 2006 -- Elizabeth Miller, USGS, Flagstaff, AZ
Initial version.
Version 2.0 -- February 13, 2008 -- Steven Lambright, USGS, Flagstaff, AZ
Added BORESIGHT keywords
Version 3.0 -- February 21, 2008 -- Steven Lambright, USGS, Flagstaff, AZ
Corrected the OD_K keyword
Version 4.0 -- Mar 23, 2010 -- Debbie A. Cook, USGS, Flagstaff, AZ
Update to include CK_FRAME_ID and CK_REFERENCE_ID
Version 5.0 -- Apr 17, 2012 -- Annie HKraus, USGS, Flagstaff, AZ
Updated FOCAL_LENGTH, OD_K, BORESIGHT_SAMPLE
and BORESIGHT_LINE based on inflight calibration
by Orrin Thomas and Randy Kirk. This involved
tiepointing 6 overlapping CTX images to a HRSC
orthoimage/DTM dataset in Gale crater and fitting
the center and coefficients of a radial distortion
polynomial. The focal length was then adjusted to
its "calibrated" value which results in equal and
opposite positive/negative excursions of the
distortion polynomial over the field of view.
Note also that the earlier versions of this kernel
contained a sign error for all OD_K distortion
coefficients, causing the use of the polynomial to
double rather than remove the distortion.
``mroctxAddendum005.ti'' Data
-------------------------------------------------------------
The following is the focal length, which is expressed in MILLIMETERS.
This value comes from Randy Kirk's spreadsheet (2012) presenting the
results of Orrin Thomas's inflight calibration of CTX based on
comparison of 6 CTX images (3 adjacent stereopairs) to an HRSC
orthoimage and DTM in Gale crater. CTX-HRSC tiepoints were measured
and then projected into the CTX images with the focal length set
to a nominal value and the distortion model temporarily to zero.
This allowed straightforward fitting of a new radial distortion
polynomial. Finally, the focal length was adjusted to its so-called
calibrated value. The first distortion coefficient is varied at the
same time so that the overall geometric model is unchanged, but at
the calibrated focal length the overall distortion polynomial has
equal and opposite positive and negative excursions over the field
of view.
The boresight samples and lines are used to specify the center of the
detector device. There are two methods to specify the center of the
detector array. The BORESIGHT parameters are expressed in pixels.
\begindata
INS-74021_FOCAL_LENGTH = 352.9271664
INS-74021_BORESIGHT_SAMPLE = 2543.46099
INS-74021_BORESIGHT_LINE = 0.430442527
\begintext
The following is the pixel pitch, which is the distance between
adjacent pixels on the CCD arrays. This is expressed in
MILLIMETERS per pixel.
\begindata
INS-74021_PIXEL_PITCH = 7.0E-3
\begintext
The following are the optical distortion parameters.
These are used to transform from observed (distorted)
coordinates (unprimed, e.g., x) to ideal coordinates
(primed, e.g., xp). Both sets of coordinates are expressed
in millimeters.
r=sqrt(x^2 + y^2)
dr = k0*r + k1*r3 + k2*r^5
rp = r - dr
xp = x * (rp/r), similarly for yp
or, rearranging a bit, we have a more efficient version:
r^2 = x^2 + y^2
dr/r = k0 + r^2*(k1 + r^2*k2)
xp = x - (dr/r)*x
yp = y - (dr/r)*y
The optical distortion parameters below come from Randy
Kirk's spreadsheet (2012 inflight calibration). Note
that the sign of the leading terms is opposite that in
the previous versions of this kernel. Earlier kernels
had mistakenly negated the distortion coefficients. As
a result, their use in the formulae given above doubled
rather than removing the optical distortion.
\begindata
INS-74021_OD_K = (
-0.00734339259200545000000,
0.00002837587863624170000,
0.00000001284198912402710
)
\begintext
The following are the parameters for computing focal plane
coords from CCD coords.
x = transx[0] + transx[1]*ccdSample_c + transx[2]*ccdLine_c
y = transy[0] + transy[1]*ccdSample_c + transy[2]*ccdLine_c
\begindata
INS-74021_TRANSX=( 0.0, 0.0, 0.007)
INS-74021_TRANSY=( 0.0, 0.007, 0.0)
\begintext
Parameters for computing CCD coords from focal plane coords
\begindata
INS-74021_ITRANSS=( 0.0, 0.0, 142.85714285714)
INS-74021_ITRANSL=( 0.0, 142.85714285714, 0.0)
\begintext
These are the parameters for writing c-kernels. Isis will create ck
with the same frame endpoints as the mission ck. For Hirise the ck
instrument frame is MRO_SPACECRAFT (-74000) and the ck reference frame
is MRO_MME_OF_DATE (-74900).
\begindata
INS-74021_CK_FRAME_ID=-74000
INS-74021_CK_REFERENCE_ID=-74900
\begintext
End of IK file.
File added
File added
This diff is collapsed.
This diff is collapsed.
KPL/LSK
LEAPSECONDS KERNEL FILE
===========================================================================
Modifications:
--------------
2016, Jul. 14 NJB Modified file to account for the leapsecond that
will occur on December 31, 2016.
2015, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2015.
2012, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2012.
2008, Jul. 7 NJB Modified file to account for the leapsecond that
will occur on December 31, 2008.
2005, Aug. 3 NJB Modified file to account for the leapsecond that
will occur on December 31, 2005.
1998, Jul 17 WLT Modified file to account for the leapsecond that
will occur on December 31, 1998.
1997, Feb 22 WLT Modified file to account for the leapsecond that
will occur on June 30, 1997.
1995, Dec 14 KSZ Corrected date of last leapsecond from 1-1-95
to 1-1-96.
1995, Oct 25 WLT Modified file to account for the leapsecond that
will occur on Dec 31, 1995.
1994, Jun 16 WLT Modified file to account for the leapsecond on
June 30, 1994.
1993, Feb. 22 CHA Modified file to account for the leapsecond on
June 30, 1993.
1992, Mar. 6 HAN Modified file to account for the leapsecond on
June 30, 1992.
1990, Oct. 8 HAN Modified file to account for the leapsecond on
Dec. 31, 1990.
Explanation:
------------
The contents of this file are used by the routine DELTET to compute the
time difference
[1] DELTA_ET = ET - UTC
the increment to be applied to UTC to give ET.
The difference between UTC and TAI,
[2] DELTA_AT = TAI - UTC
is always an integral number of seconds. The value of DELTA_AT was 10
seconds in January 1972, and increases by one each time a leap second
is declared. Combining [1] and [2] gives
[3] DELTA_ET = ET - (TAI - DELTA_AT)
= (ET - TAI) + DELTA_AT
The difference (ET - TAI) is periodic, and is given by
[4] ET - TAI = DELTA_T_A + K sin E
where DELTA_T_A and K are constant, and E is the eccentric anomaly of the
heliocentric orbit of the Earth-Moon barycenter. Equation [4], which ignores
small-period fluctuations, is accurate to about 0.000030 seconds.
The eccentric anomaly E is given by
[5] E = M + EB sin M
where M is the mean anomaly, which in turn is given by
[6] M = M + M t
0 1
where t is the number of ephemeris seconds past J2000.
Thus, in order to compute DELTA_ET, the following items are necessary.
DELTA_TA
K
EB
M0
M1
DELTA_AT after each leap second.
The numbers, and the formulation, are taken from the following sources.
1) Moyer, T.D., Transformation from Proper Time on Earth to
Coordinate Time in Solar System Barycentric Space-Time Frame
of Reference, Parts 1 and 2, Celestial Mechanics 23 (1981),
33-56 and 57-68.
2) Moyer, T.D., Effects of Conversion to the J2000 Astronomical
Reference System on Algorithms for Computing Time Differences
and Clock Rates, JPL IOM 314.5--942, 1 October 1985.
The variable names used above are consistent with those used in the
Astronomical Almanac.
\begindata
DELTET/DELTA_T_A = 32.184
DELTET/K = 1.657D-3
DELTET/EB = 1.671D-2
DELTET/M = ( 6.239996D0 1.99096871D-7 )
DELTET/DELTA_AT = ( 10, @1972-JAN-1
11, @1972-JUL-1
12, @1973-JAN-1
13, @1974-JAN-1
14, @1975-JAN-1
15, @1976-JAN-1
16, @1977-JAN-1
17, @1978-JAN-1
18, @1979-JAN-1
19, @1980-JAN-1
20, @1981-JUL-1
21, @1982-JUL-1
22, @1983-JUL-1
23, @1985-JUL-1
24, @1988-JAN-1
25, @1990-JAN-1
26, @1991-JAN-1
27, @1992-JUL-1
28, @1993-JUL-1
29, @1994-JUL-1
30, @1996-JAN-1
31, @1997-JUL-1
32, @1999-JAN-1
33, @2006-JAN-1
34, @2009-JAN-1
35, @2012-JUL-1
36, @2015-JUL-1
37, @2017-JAN-1 )
\begintext
This diff is collapsed.
......@@ -36,7 +36,10 @@ theme:
nav:
- Home: index.md
- Getting Started: getting-started/index.md
- Getting Started:
- Home: getting-started/index.md
- CSM Stack:
- Generating an ISD, creating a CSM model, and converting coordinates: getting-started/CSM Stack/ImageToGroundTutorial.ipynb
- How-To Guides:
- Home: how-to-guides/index.md
- Software Management:
......@@ -61,6 +64,8 @@ extra_javascript:
plugins:
- search
- mkdocs-jupyter:
include_source: true
markdown_extensions:
- neoteroi.cards
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment