How to stack RGB cubes into a single framelet?

Hi everyone,

I’m having trouble stacking JunoCam’s filtered RGB .cub files into one single framelet.

Using ISIS, I can work on JunoCam images and break a single IMG file into all of its individual .cub files, and I’m wondering if there’s a way to stack or combine each framelet’s individual red/blue/green filter .cub files into a single, stacked, framelet.

For example, say I’d like to look at one stacked image representing Framelet 4 in full, instead of 3 separate .cub files output representing Framelet4_red, Framelet4_blue, Framelet4_green, etc.
Is this possible?

My goal is to do this in Python, but if there’s a way to do it in ISIS (or GDAL?) I’d be happy to try that first just to get it working.

If anything is unclear please let me know, and any help/insight/direction is appreciated, thank you.

try the isis program cubeit, however all of the cubes to be stacked together must have the same dimensions. If that is not the case you can use one image to mask (isis program) the others to make them all the same dimension or mosaic each image into the same lat/lon range if they have been projected.

https://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/cubeit/cubeit.html

This is great feedback, thanks Lynn!

Lynn’s advice is excellent. If they aren’t perfectly lined up, as she indicates, you can use the handmos program, paying attention to the outband parameter. You can rely on map projections if the data are map projected, but if they’re still in camera geometry, then you can use outsamp and outline to nudge where the pixels go relative to the pixels already in the mosaic on different bands.

You’re right, this is easy to do in Python, too, and I’d suggest using the rasterio package for raster manipulation–so handy!

1 Like

Will look to rasterio Ross, thank you!

I think you’re looking for this enhancement request: junocam2isis multi-band full CCD cube · Issue #4748 · USGS-Astrogeology/ISIS3 · GitHub

Right now junocam2isis is able to produce what you’re looking for but it does not separate out the filters into different bands. Would you be interested in this functionality as a part of junocam2isis?