pds-data-dictionaries / ldd-nh

Attributes used for mission-specific metadata in the New Horizons primary mission and extended missions to Kuiper Belt Objects.
Apache License 2.0
0 stars 0 forks source link

LORRI `binning_mode` attribute - do we need it? #16

Closed cgobat closed 3 weeks ago

cgobat commented 3 months ago

I see that an an nh:binning_mode attribute was added on the alice+lorri_classes branch.

I have typically done something like

<img:Downsampling>
  <img:processing_venue>Onboard Hardware</img:processing_venue>
  <img:processing_algorithm>Binning</img:processing_algorithm>
  <img:Pixel_Averaging_Dimensions>
    <img:height_pixels unit="pixel">4</img:height_pixels>
    <img:width_pixels unit="pixel">4</img:width_pixels>
  </img:Pixel_Averaging_Dimensions>
</img:Downsampling>

to convey binning information. Given that such a structure already exists in a general-use discipline dictionary, is there a reason to introduce a new mission-specific attribute that duplicates this information?

benjhirsch commented 3 months ago

Hmm, I don't think the definition for Pixel_Averaging_Dimensions works for LORRI's binning mode. It provides the "height and width, in pixels, of the area over which pixels were averaged prior to image compression."

But the 4x4 LORRI binning mode is not used for compression; the 16 pixels are summed (rather than averaged) to increase the sensitivity/limiting magnitude of the instrument. 4x4 binning mode is switched on when searching for KBOs or other distant objects, whereas 1x1 binning mode is used for high resolution images of extended objects.

katecrombie commented 3 months ago

I think @cgobat is on the right track with the example., but I think we need to use the Sampling Class,

<img:Sampling>
  <img:crosstrack_summing></img:crosstrack_summing>
  <img:alongtrack_summing></img:alongtrack_summing>
<img:Sampling>

The Sampling class contains attributes and classes related to the sampling, scaling, companding, and compression or reduction in resolution of data.

You may worry that the definition of attributes says "The crosstrack_summing attribute provides the number of detector pixel values in the crosstrack direction that have been averaged to produce the final output pixel." , however we just need to talk with EN to get a nuance for NH LORRI that clarifies that pixels have been summed rather than averaged.

cgobat commented 3 months ago

That makes sense to me. Perhaps there is room for improvement/correction to that description in general, considering the name of the attribute(s) itself says "summing"...

It seems like those attributes should also allow for unit=pixel, which they currently don't.

We could consider adding something like

<img:Companding>
    <img:processing_venue>Onboard Hardware</img:processing_venue>
    <img:processing_algorithm>Binning</img:processing_algorithm>
    <img:companding_state>None</img:companding_state>
</img:Companding>

to the img:Sampling class too, just to be even more clear about what it represents.

cgobat commented 2 months ago

I believe the outcome of the emails between Anne, Trent, and Bob is that we are good to go ahead and use the existing img:Downsampling class, with a possible description update to come. That said, are we all on board with foregoing this mission-specific binning_mode attribute?

@acraugh @benjhirsch

acraugh commented 4 weeks ago

@cgobat and @benjhirsch : What is the resolution of this binning debate?

cgobat commented 4 weeks ago

I think @benjhirsch mentioned on Thursday that he was okay/planning to just use the existing img: class(es) for this. If that is the case we should be good to remove the attribute and close this issue.

acraugh commented 4 weeks ago

Okey-doke. So what's it gonna be @benjhirsch?

benjhirsch commented 3 weeks ago

Yes, I am fine with removing that attribute from the ingest file.