WarwickMicroscopy / Felix

Felix: Bloch wave method diffraction pattern simulation software
16 stars 10 forks source link

rainbow-intensity images using command-line convert #168

Closed JacobJoseph-gu closed 7 years ago

JacobJoseph-gu commented 7 years ago

I thought I'd share this here:

convert -size 070x070 -depth 64 -define quantum:format=floating-point -define quantum:scale=65535.0 -endian lsb GRAY:GaAs_085nm070x070+0+0+0.bin GaAs_085nm070x070+0+0+0.png

gaas_085nm_070x070_ 0 0 0

convert xc:black xc:red xc:orange xc:yellow xc:green1 xc:cyan xc:blue xc:blueviolet xc:black +append -filter Cubic -resize 600x30! -flop rainbow.png

rainbow

convert GaAs_085nm070x070+0+0+0.png -colorspace gray rainbow.png -clut GaAs_085nm070x070+0+0+0_rainbow.png

gaas_085nm_070x070_ 0 0 0_rainbow

RudoRoemer commented 7 years ago

Good, but not quite “Carling” ;-)

The rainbow colours at high intensities should not go back to black, but best end in “white” (or some colour clearly different from black). Otherwise the no-intensity is hard to distinguish from the max-intensity.

JacobJoseph-gu commented 7 years ago

It is a bad habbit of mine to move on once I have worked out how to do something, instead of finishing it off properly.

By using creating the 600x30 rainbow image, we easily have full control and can play around with various looks:

rainbow 1

crystal_rainbow