Skip to content

Import for cassini iss fring mosaics rsfrench2025#1437

Open
juzen2003 wants to merge 84 commits intomainfrom
import_for_cassini_iss_fring_mosaics_rsfrench2025
Open

Import for cassini iss fring mosaics rsfrench2025#1437
juzen2003 wants to merge 84 commits intomainfrom
import_for_cassini_iss_fring_mosaics_rsfrench2025

Conversation

@juzen2003
Copy link
Copy Markdown
Collaborator

@juzen2003 juzen2003 commented Apr 1, 2026

Description of changes:

  • Add obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py to define ObsBundleCassiniIssFringMosaicsRSFrench2025 class for all f-ring bundle fields
    • Set greater pixel size to 18000, and lesser pixel size to 401
    • Set intensity levels to N/A
    • Set shutter mode, compression type, data conversion type, gain mode, image number, target description to N/A
    • Set the unit of longitudinal resolution to generic_angle
  • Add a new entry in bundle info list for f-ring bundle (config_bundle_info.py)
  • Add new opus product type entries for f-ring bundles (internal_def_product_types.json)
  • Change the max length of "primary_lid", "category", and "short_name" fields to work with the f-ring bundle. (obs_files.json, obs_pds.json, and search/models.py)
  • Add tests results for co-iss-n1479208692 (f ring), co-iss-fring-mosaic-iss_00ari_spkmovper001_prime, and co-iss-fring-mosaic-iss_183ri_spokemov001_prime
  • Update api_product_types_empty_search.json to include newly added opus product types for f-ring bundle.
  • Update test__api_meta_range_endpoints_greaterpixelsize_COISS (test_metadata_api.py)
  • Update test__api_meta_range_endpoints_lesserpixelsize_COISS (test_metadata_api.py)
  • Add f-ring bundle to api_help_bundles.html
  • Update test__api_meta_mults to include the f-ring bundles counts under Cassini category (test_metadata_api.py)
  • Add test results for co-iss-n1479210132 (f ring and b ring) and co-iss-n1481265970 (b ring)

Note:

  • Steps to import with shelves files:
    • Copy shelves files form these directories _infoshelf-* and checksums-* in Dropbox under Pds4FileTest/pds4-holdings
    • We are ready to import.

Known problems:

Summary by CodeRabbit

  • New Features

    • Added Cassini ISS F‑Ring mosaics and reprojected‑image products, with background‑subtracted variants, documentation, and multi‑resolution browse thumbnails.
  • Chores

    • Expanded schema/field size limits to support longer product identifiers.
    • Introduced a new "Mosaic" observation subtype and updated observation‑type mappings.
    • Added import bundle/config entries, import script adjustments, and many new/static API test fixtures for the new products.

…t_all_internal.sh, config_bundle_info.py, import_for_tests.sh, and import_util.py
…25 in config_bundle_info.py to include additional global mosaic files.
…update config_bundle_info.py to correct class name casing and primary index order for Cassini ISS F-ring mosaic bundle.
…al_def_product_types.json, including various image and metadata formats, as well as documentation and index files.
…_opus_import_volumes.sh for import and deployment.
…Files and ObsPds models by increasing field lengths for category, short_name, and primary_lid. Update related JSON schemas to reflect these changes. Adjust import logic to allow for missing shelf files in PDS4 products.
…-iss-fring-mosaic-iss_183ri_spokemov001_prime, and co-iss-n1479208692
…ta_api.py and add new product type entries for Cassini ISS F-ring mosaics in api_product_types_empty_search.json.
…lesser pixels size endpoints, and add new product type entry for Cassini ISS F-ring mosaics in api_help_bundles.html.
…ding camera property, updating image pixel size methods, and modifying instrument-related methods to return None where applicable. Adjust JSON schema for obs_ring_geometry to change form type from distance_resolution to generic_angle for projected longitudinal resolution fields.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds full support for the Cassini ISS F‑Ring mosaics bundle cassini_iss_fring_mosaics_rsfrench2025: new ObsBundle class and registration, many new product‑type/schema entries and JSON test fixtures, PDS4 import/shelve handling, COISS field/refactor changes, and small model/schema field length increases.

Changes

Cohort / File(s) Summary
Models & table schemas
opus/application/apps/search/models.py, opus/import/table_schemas/obs_files.json, opus/import/table_schemas/obs_pds.json
Increased field lengths: ObsFiles.category/short_name 32→64 and ObsPds.primary_lid 100→240; corresponding schema type updates (char32char64, char100char240).
New bundle & product types
opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py, opus/import/config_bundle_info.py, opus/import/table_schemas/internal_def_product_types.json
Added ObsBundleCassiniISSFRingMosaicsRSFrench2025, registered bundle in BUNDLE_INFO, and appended many F‑Ring OPUS product type definitions (mosaics, reprojections, indices, browses, docs).
Import pipeline & PDS4 handling
opus/import/main_opus_import.py, opus/import/do_import.py, opus/import/import_util.py
Enabled PDS4 shelve handling in shelf-only mode, suppressed shelf-missing warnings for Pds4File, and added the new bundle to ALL bundle expansion.
Import orchestration scripts
opus/import/_import_all_internal.sh, opus/import/import_for_tests.sh, scripts/server/import_and_deploy/_opus_import_volumes.sh
Added test import invocation for the new bundle; in some internal scripts the new bundle/volume import lines were commented out (disabled in those flows).
COISS / Cassini refactor
opus/import/obs_cassini_common.py, opus/import/obs_cassini_common_pds3.py, opus/import/obs_cassini_common_pds4.py, opus/import/obs_volume_coiss_12xxx.py
Centralized COISS helpers/constants, added many COISS field methods (stubs/overrides for PDS3/PDS4), changed mission obs-name handling in base, removed duplicate wavelength mapping from a volume class, and adjusted SCLK parsing behavior in PDS4.
Observation schemas & enums
opus/import/table_schemas/obs_general.json, opus/import/table_schemas/obs_instrument_coiss.json, opus/import/table_schemas/obs_type_image.json
Inserted new MOS observation subtype and shifted codes; relaxed nullability for several COISS instrument fields and added N/A/null options; added MOSAIC image_type option and adjusted enum entries.
ObsBundle & profile adjustments
opus/import/obs_bundle_cassini_uvis_solarocc_beckerjarmak2023.py, opus/import/obs_bundle_uranus_occs_earthbased.py, opus/import/obs_profile_pds4.py, opus/import/obs_volume_cocirs_01xxx.py
Added/changed profile and helper methods (occultation/profile fields, optical depth fallbacks), removed some PDS4 profile logic and equinox constants, and replaced equinox checks with ring‑north lit helper usage.
Test fixtures & API responses
opus/application/test_api/responses/... (many new JSON files), opus/application/test_api/responses/api_product_types_empty_search.json, opus/application/test_api/responses/api_help_bundles.html
Added numerous new JSON response fixtures for F‑Ring mosaics (files/images/metadata) and updated API product types and help bundles HTML to include new entries.
Tests & small script edits
opus/application/test_api/create_test_results.py, opus/application/test_api/test_metadata_api.py
Minor updates to commented OPUS_ID lists and adjusted expected metadata API values (Cassini mults and pixel-size/levels expectations).
Import code logic tweak
opus/import/do_import.py
Suppressed shelf-missing warning for PDS4 file instances (only warn+skip for non‑Pds4File cases).
Formatting config
.flake8
Increased max-line-length from 90 → 100.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive Several code changes appear to extend beyond the immediate F-ring bundle support: refactoring in ObsCassiniCommon (new helper methods, field reorganization), changes to ObsProfilePDS4 and unrelated bundle classes, and updates to flake8 configuration. These may be necessary infrastructure improvements but are not explicitly described in the linked issue. Clarify whether refactoring in ObsCassiniCommon, ObsProfilePDS4, and other bundle/profile classes were necessary prerequisites for F-ring bundle support, or if they should be split into separate PRs.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding import support for the Cassini ISS F-ring mosaics rsfrench2025 bundle. It is concise and directly related to the primary objective of the PR.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #1416: adding import pipeline support for the new Cassini ISS F-ring mosaics bundle. All code changes align with enabling the bundle import, including bundle class, configuration, schema updates, product type definitions, and tests.
Description check ✅ Passed The PR description follows the required template structure with all major sections completed, including fixes reference, import requirement confirmation, script review confirmation, and a detailed description of changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@opus/application/test_api/responses/api_product_types_empty_search.json`:
- Around line 1752-1759: The JSON object ending with "product_type":
"coiss_f_ring_browse_reproj_img_full" and "version_number": 999999 has its
closing brace `},` mis-indented; fix the indentation so the closing brace aligns
with the opening brace of that object (i.e., indent the `},` to the same level
as the opening `{` for that object) to maintain consistent JSON object structure
and valid formatting.

In `@opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py`:
- Around line 37-39: The camera property accesses
self._index_col('min_image_name')[-1] without checking for None, which can raise
TypeError; update the camera property (camera) to first assign the result of
self._index_col('min_image_name') to a local variable, check if it is None or
empty, and return None (or a safe default) instead of indexing into None, and
ensure callers handle None; also update the related wavelength lookup code (the
methods using _COISS_FILTER_WAVELENGTHS at lines ~250-260) to guard against
camera being None (e.g., skip the lookup or handle a None key) to avoid KeyError
when using (None, 'CL1', 'CL2').
- Around line 250-260: The field_obs_wavelength_wavelength1 and
field_obs_wavelength_wavelength2 methods assume _COISS_FILTER_WAVELENGTHS has an
entry for (self.camera, 'CL1', 'CL2'); add a defensive validation that
self.camera is one of the expected values (e.g., 'N' or 'W') and/or that the
tuple key exists in _COISS_FILTER_WAVELENGTHS before indexing it, and if not
present raise a clear ValueError or return a safe fallback; ensure the check
references self.camera and the key (self.camera, 'CL1', 'CL2') so the error
message identifies the missing camera/key and the method names in the message
for easier debugging.

In `@opus/import/table_schemas/obs_ring_geometry.json`:
- Line 1036: The pi_form_type entry for the longitudinal resolution fields was
incorrectly set to use an angular unit suffix ("generic_angle"), which conflicts
with their distance semantics; edit the pi_form_type value for the affected
entries (the one currently showing "RANGE%.5f:generic_angle" and the similar
entry at the other occurrence) to use the distance unit suffix used by
RINGGEOprojectedlongitudinalresolution* (i.e., replace ":generic_angle" with the
correct distance unit suffix consistent with other
RINGGEOprojectedlongitudinalresolution fields so the API treats these as
distances).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f14bdb26-6cc1-4983-947a-332e02a44031

📥 Commits

Reviewing files that changed from the base of the PR and between 06302bc and 4600ce1.

📒 Files selected for processing (27)
  • opus/application/apps/search/models.py
  • opus/application/test_api/create_test_results.py
  • opus/application/test_api/responses/api_help_bundles.html
  • opus/application/test_api/responses/api_product_types_empty_search.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_00ari_spkmovper001_prime_files.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_00ari_spkmovper001_prime_images.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_00ari_spkmovper001_prime_metadata.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_183ri_spokemov001_prime_files.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_183ri_spokemov001_prime_images.json
  • opus/application/test_api/responses/results_co_iss_fring_mosaic_iss_183ri_spokemov001_prime_metadata.json
  • opus/application/test_api/responses/results_co_iss_n1479208692_files.json
  • opus/application/test_api/responses/results_co_iss_n1479208692_images.json
  • opus/application/test_api/responses/results_co_iss_n1479208692_metadata.json
  • opus/application/test_api/test_metadata_api.py
  • opus/import/_import_all_internal.sh
  • opus/import/config_bundle_info.py
  • opus/import/do_import.py
  • opus/import/import_for_tests.sh
  • opus/import/import_util.py
  • opus/import/main_opus_import.py
  • opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py
  • opus/import/table_schemas/internal_def_product_types.json
  • opus/import/table_schemas/obs_files.json
  • opus/import/table_schemas/obs_general.json
  • opus/import/table_schemas/obs_pds.json
  • opus/import/table_schemas/obs_ring_geometry.json
  • scripts/server/import_and_deploy/_opus_import_volumes.sh

Comment thread opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py Outdated
Comment thread opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py
Comment thread opus/import/table_schemas/obs_ring_geometry.json Outdated
…e_shelves_only method, ensuring compatibility with PDS4 products.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@opus/import/main_opus_import.py`:
- Around line 419-423: The code unconditionally calls
Pds3File.require_shelves(True) and Pds4File.require_shelves(True), which
violates the --dont-use-shelves-only flag; change the logic to honor
impglobals.ARGUMENTS.dont_use_shelves_only by only calling
Pds3File.require_shelves(True) and Pds4File.require_shelves(True) when
dont_use_shelves_only is False (mirror the existing conditional around
use_shelves_only()), so PDS4 shelf requirement is not forced when the flag is
set and the do_import.py skip logic for missing shelves remains effective.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bd5febbe-3168-4fb6-bcd0-e8f2018a11a3

📥 Commits

Reviewing files that changed from the base of the PR and between 4600ce1 and 9b9d3d0.

📒 Files selected for processing (1)
  • opus/import/main_opus_import.py

Comment thread opus/import/main_opus_import.py Outdated
"version_name": "Current"
},
{
"category": "Cassini ISS F Ring Reprojected Image",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency I think this needs to be "Images".

Comment thread opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py Outdated
def field_obs_wavelength_wave_no_res2(self):
return self.field_obs_wavelength_wave_no_res1()

def field_obs_wavelength_polarization_type(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed - default



##############################################
### FIELD METHODS FOR obs_instrument_coiss #
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix ###



##############################################
### FIELD METHODS FOR obs_instrument_coiss #
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix ###

Now that we have two volumes/bundles for COISS, we should have an obs_cassini_iss_common.py, obs_cassini_iss_common_pds3.py, and obs_cassini_iss_common_pds4.py. Both obs_volume_coiss_12xxx.py and this file should use it. The main common file should define all of the fields as None. The PDS3 version should have all of the stuff from coiss_12xxx (and delete it from there). The PDS4 version should try to fill in all of the fields using standard PDS4 class names. See any reprojected image label file for a full set of PDS4 Cassini ISS attributes.

Then remove the default items from this section and leave the ones necessary to override, since we don't actually provide any of these items in the mosaic index file.

for VOLUME in \
EBROCC \
uranus_occs_earthbased \
cassini_iss_fring_mosaics_rsfrench2025 \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment out for now

juzen2003 added 12 commits April 2, 2026 10:25
… pi_form_type in obs_ring_geometry.json from generic_angle to distance_resolution for projected longitudinal resolution fields.
…Cassini ISS F Ring Reprojected Image" to "Cassini ISS F Ring Reprojected Images" for consistency across multiple entries.
…ernal_def_product_types.json for clarity and consistency. Modify ObsBundleCassiniIssFringMosaicsRSFrench2025 class to return camera-specific shutter mode ID.
…iss_fring_mosaics_rsfrench2025 in _import_all_internal.sh and correcting a comment typo in do_import.py for clarity.
…or clarity, changing 'projected_long_resolution1' and 'projected_long_resolution2' to 'projected_long_resolution_angle1' and 'projected_long_resolution_angle2' respectively.
…nts for clarity and ensuring consistent shelf requirements for both PDS3 and PDS4 files.
… imports for consistency, changing class name to ObsBundleCassiniISSFRingMosaicsRSFrench2025 in relevant files.
…ne for camera-specific shutter mode ID method, enhancing clarity and consistency in instrument-related methods.
…S4 subclasses to streamline method calls, ensuring consistent handling of observation names across different formats.
…nding longitude in ObsBundleCassiniISSFRingMosaicsRSFrench2025 class. Refactor spacecraft clock count methods in ObsCassiniCommonPDS4 for improved error handling and consistency.
…thods for ring geometry calculations, including north-based incidence and emission angles, solar and observer ring opening angles, and a method to determine if the north side of the ring is lit. Refactor existing longitude methods for improved accuracy.
…osaicsRSFrench2025 class to directly use _index_col for minimum and maximum radial resolutions, improving code clarity and reducing redundancy.
…k for None values in the observation ID field, ensuring consistent return values and preventing potential attribute errors.
… _coiss_camera_letter_pds4 method for improved clarity and error management. Update field_obs_instrument_coiss_combined_filter to utilize the new method, ensuring consistent handling of None values and enhancing logging for unexpected shutter mode IDs.
…classes by adding checks for None values in the _is_ring_north_side_lit method. This ensures consistent return values and prevents potential attribute errors when the sunlit side of the rings is unknown.
@juzen2003
Copy link
Copy Markdown
Collaborator Author

All comments addressed.

Comment thread opus/import/obs_bundle_cassini_iss_fring_mosaics_rsfrench2025.py
def field_obs_profile_quality_score(self):
return self._create_mult(self._index_col('rings:data_quality_score'))

# TODO: Investigate further and fix if necessary. For the moment, assume BeckerJarmak optical
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this BeckerJarmak stuff doesn't make sense here - this is the Uranus occs file

Comment thread opus/import/obs_cassini_common.py
def field_obs_profile_quality_score(self):
return self._create_mult(self._index_col('rings:data_quality_score'))

# TODO: Investigate further and fix if necessary. For the moment, assume BeckerJarmak optical
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise remove the Uranus stuff from here

Comment thread opus/import/obs_cassini_common_pds4.py Outdated
target_desc = coiss_target_desc_mapping[target_desc]
return self._create_mult(target_desc)

def _coiss_camera_letter_pds4(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a real hack. Maybe this is only needed for the Mosaics and should be moved to that file? For the real ISS bundles (that we aren't importing yet) we should get the camera from the LID.

def _camera(self):
return self._index_col('min_image_name')[-1].upper()

def _circumference(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a global constant:

_F_RING_CIRCUMFERENCE = 2 * math.pi * 140221.3

return self._index_col('rings:maximum_inertial_ring_longitude')

# Phase angle: The angle between the point where incoming source photons
# hit the ring , to the direction where outgoing photons to the observer
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before ,

Not sure why you're defining phase angle at all here, though.

self.field_obs_ring_geometry_ascending_longitude2())

def field_obs_ring_geometry_ascending_longitude1(self):
# minimum_longitude_ascending_node
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment and the one below seem redundant with the function name


# Source: star, observer: COISS
# Incidence angle: the angle between the point where incoming source photons
# hit the ring, to the north pole of the planet we're looking at (normal vector
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lit side is not the north side! It's the south pole when the lit side is the south side of the rings.

But not sure why any of these comments are here - these are just restating the definitions of these fields.

##############################################################

def field_obs_mission_cassini_obs_name(self):
# Strip leading/trailing whitespace from the label value
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to do this here. It should be taken care of where the table is read in the first place.

…lue checks and enhance clarity. Update filter assignment logic to ensure proper handling of polarization filters and streamline wavelength comparison conditions.
… handling of polarization filters and streamline None value checks. Remove commented-out code for clarity.
…h2025 class for improved clarity and consistency.
… by removing unnecessary None checks and comments for improved clarity and consistency.
… plans for PDS3-specific functionality and improve code documentation.
…armak class by removing unnecessary None checks and comments for improved clarity and consistency. Update handling of optical depth parameters to streamline code.
…ter method of ObsCassiniCommonPDS4 class to improve clarity by rearranging code structure. Ensure proper handling of filter variables after camera check.
…25 class by changing NOTE_MAPPING to _NOTE_MAPPING for consistency. Replace _circumference method with a constant _F_RING_CIRCUMFERENCE to simplify calculations in field_obs_ring_geometry_projected_long_resolution methods.
…s by removing outdated and unnecessary comments related to ring geometry methods for improved clarity and code cleanliness.
…g outdated comments related to ring geometry methods for improved clarity and code cleanliness.
…25 class to enhance code clarity and maintainability.
@juzen2003
Copy link
Copy Markdown
Collaborator Author

All comments addressed.

…if_str helper function to streamline whitespace removal from string values. Simplify field_obs_mission_cassini_obs_name method in obs_cassini_common_pds4.py by directly returning the stripped value without additional checks.
Comment thread opus/import/import_util.py Outdated

return rows, label

def _strip_if_str(value):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is another workaround for a problem that shouldn't be here in the first place. The point is that when the index file is read there should not be any strings with trailing space in it. PdsTable does this correctly, but we are only using it for PDS3 index files. The issue is we are using just plain CSV reading for PDS4, but I'm giving you a fixed-width table, and the csv reading isn't stripping the fields. This will eventually be fixed properly when we use PdsTable to read PDS4 index files, but for now the correct fix is to change the reading of the index file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.strip() is done in safe_pdstable_read function now

ret = self._index_col('rings:lowest_detectable_opacity') # Uranus Occs
if ret is None:
ret = self._index_col('rings:lowest_detectable_normal_optical_depth') # BeckerJarmak. Note co-uvis-occ-2016-269-sun-i has -999.
ret = self._index_col('rings:lowest_detectable_normal_optical_depth')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the fix is good but the comment about the -999 has gone away. But I think this is a very interesting comment. In the current OPUS the -999 is showing up in the search results, which is wrong. I presume when the new index file is created it will have -999 marked as a bad value and PdsTable will mask it out, but I'm going to create an issue about it so we don't forget it. But this is an example of paying attention to details in a way that AI will never do for you.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are put back

…o address handling of -999 values in optical depth methods for improved data integrity.
…nding spaces from string values when parsing floats, improving data integrity. Remove the _strip_if_str helper function for simplification.
…om 'row' to 'rows' to correct iteration logic, enhancing code accuracy.
…and N1481265970, including metadata, images, and associated data files. Enhance data structure for improved accessibility and organization.
…t result identifiers for Cassini ISS observations, enhancing future test coverage.
…ges, enhancing data representation for empty search scenarios.
… a new product type and correcting formatting for improved data structure.
…onse for Cassini ISS observations, enhancing data representation and accessibility.
…ternal_def_product_types.json, enhancing data representation and accessibility in API responses.
…n API response JSON to improve clarity and consistency.
…oduct types in API response JSON to correct inconsistencies and enhance clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for the F Ring bundle

2 participants