Hello William,
CSV file that is expected on input for the .loadReflectancePanelCalibration() function is just a two-column text file (see a part f it below):
Wavelength(nm), Reflectance
652.0, 0.6804
653.0, 0.6812
654.0, 0.6814
655.0, 0.6809
656.0, 0.6806
657.0, 0.681
658.0, 0.681
659.0, 0.6808
660.0, 0.68
661.0, 0.679
662.0, 0.6788
663.0, 0.6788
664.0, 0.6788
665.0, 0.6789
666.0, 0.6776
667.0, 0.6762
668.0, 0.6759
669.0, 0.6766
670.0, 0.677
671.0, 0.6765
672.0, 0.6755
673.0, 0.6748
In case you need to load the parameters from the file like you've mentioned, you can use the following approach:
albedo = {"Blue": "0.65952", "Green": "0.67788", "Red": "0.67718", "NIR": "0.66653", "Rededge": "0.6223266"} #values read from the file
for camera in chunk.cameras:
if camera.group.label != "Calibration images":
continue
for plane in camera.planes:
plane.meta["ReflectancePanel/Calibration"] = albedo[plane.sensor.bands]
PhotoScan.Tasks class can be used in the following way to perform the reflectance calibration:
task = PhotoScan.Tasks.CalibrateReflectance()
task.use_reflectance_panels = True
task.use_sun_sensor = True
task.apply(chunk)
If you use this approach, there's no longer a need to use .calibrateReflectance() function. In the next version update this function would have arguments to enable both options.