How does CS encode gain transformations?

Hi,

When I import moves and indicate the gain should be flipped in Y, does CS create a flipped copy of the gain? Or does it just store in metadata somewhere that if a gain_ref_blob is attached to these movies, it ought to be flipped before applying?

Asking because I am making a CS tools script to estimate the gain from a selected set of movies

Cheers

Oli

Hi @olibclarke,

Gain info is stored under the slot gain_ref_blob. Here you will find:

 'gain_ref_blob/path'
 'gain_ref_blob/idx'
 'gain_ref_blob/shape'
 'gain_ref_blob/flip_x'
 'gain_ref_blob/flip_y'

Of which the flip_x and flip_y will be 0 for off (don’t flip) and 1 for on (or flip). This info is written at time of movie import. Anytime movie manipulations are done (PMC or RBMC), the gain is applied.

Best,
Kye

1 Like

Thanks that’s very helpful - it means if replacing the gain with one estimated from movies, flip etc should be reset to 0 in the new gain ref blob

Yes, along with updating the gain_ref_blob/path information. I would import it and put it into the correct folder with where the movies are located, e.g.

If import movies folder is J123 then set the path info to J123/imported/gain_file.mrc and make sure that gain file is present.

1 Like