Image processing performed by STXMPy. (a) Unprocessed intensity image of isolated mouse melanosomes (image size approximately 20 μm × 20 μm). Note there are two fluctuations in beam intensity, one with regional influence (upper arrow) and one influencing only a single line (bottom arrow). All images have been pseudocolored so that blue represents low absorption and red high absorption. (b) Absorption image generated by AbsorptionSm.py script using the graythresh algorithm. (c) Correction for beam fluctuations performed with line-by-line absorption calculation. An intensity threshold of 80% was used to reject pixels with lower intensities and the mean value of the selected pixels was used as I0. Note that the influence of the regional fluctuation in beam intensity has been negated.