Hello t.h.,
given a chunk with Micasense RedEdge P sensor data set, you can set the primary channel to channel 3 panchro by:
chunk.primary_channel = 2
then after processing you can set sharpening formulae by:
chunk.raster_transform.formula = ['B1 * (B3 / (0.2 * B1 + 0.2 * B2 + 0.2 * B4 + 0.2 * B5 + 0.2 * B6))/32768',
'B2 * (B3 / (0.2 * B1 + 0.2 * B2 + 0.2 * B4 + 0.2 * B5 + 0.2 * B6))/32768',
'B4 * (B3 / (0.2 * B1 + 0.2 * B2 + 0.2 * B4 + 0.2 * B5 + 0.2 * B6))/32768',
'B5 * (B3 / (0.2 * B1 + 0.2 * B2 + 0.2 * B4 + 0.2 * B5 + 0.2 * B6))/32768',
'B6 * (B3 / (0.2 * B1 + 0.2 * B2 + 0.2 * B4 + 0.2 * B5 + 0.2 * B6))/32768']
To enable the raster transform do:
chunk.raster_transform.enabled = True
and for orthomosaic export look at (in API reference manuel p.36):
chunk.exportRaster(path='', format=, image_format=, raster_transform=Metashape.RasterTransformValue
This should get you started...