cellmap_flow.portable.calls

What the browser calls: the functions web/src/backend/routes/rank.ts runs through chunkmirage’s Engine.call("cellmap_flow.portable.calls:<name>", args, arrays) (chunkmirage.calls says the shape: fn(args, arrays), args the JSON arguments, arrays the bytes sent beside them, in order; a JSON value, bytes, or a pair of JSON and arrays back). Each decodes its arrays, calls the maths in rank.py, carry.py or activation.py and encodes the answer; the maths is not here. The workers take turns, so what a call needs from the one before (the rank’s tallies) travels in its JSON.

Functions

rank_tally(args, arrays)

One painted chunk added to a model's tallies (rank.tally). args:

rank_score(args, arrays)

The score of tallies (rank.rank_score) for channels, an affinity model's or not; null when nothing was counted.

windowed(args, arrays)

rank.windowed: norm with its MinMaxNormalizer set to the raw's window [lo, hi], or null.

norm_tries(args, arrays)

rank.norm_tries: the input normalizations a model is scored

best_try(args, arrays)

rank.best_try: the index of the best of scores, or null.

needed_postprocess(args, arrays)

rank.needed_postprocess: the postprocessing a model of

output_activation(args, arrays)

activation.output_activation: the output activation of a served

rank_row(args, arrays)

rank.score_row: the ranking's row from base (the score read

carry_paint(args, arrays)

The old volume's paint carried onto the new grid (carry.carry).

Module Contents

cellmap_flow.portable.calls.rank_tally(args, arrays)

One painted chunk added to a model’s tallies (rank.tally). args: tallies (the ones so far, as this answered them; null for fresh ones), shape (z, y, x), channels, labels_dtype and affinity; arrays: the chunk’s labels (z, y, x), then its target, mask and the model’s logits (each C, z, y, x float32, the logits NaN where not read). Answers the tallies.

cellmap_flow.portable.calls.rank_score(args, arrays)

The score of tallies (rank.rank_score) for channels, an affinity model’s or not; null when nothing was counted.

cellmap_flow.portable.calls.windowed(args, arrays)

rank.windowed: norm with its MinMaxNormalizer set to the raw’s window [lo, hi], or null.

cellmap_flow.portable.calls.norm_tries(args, arrays)

rank.norm_tries: the input normalizations a model is scored through, from own (its declaration, own_from) and session.

cellmap_flow.portable.calls.best_try(args, arrays)

rank.best_try: the index of the best of scores, or null.

cellmap_flow.portable.calls.needed_postprocess(args, arrays)

rank.needed_postprocess: the postprocessing a model of output_class needs instead of postprocess to show a good prediction, with a ThresholdPostprocessor at threshold (a probability) when that is given, or null.

cellmap_flow.portable.calls.output_activation(args, arrays)

activation.output_activation: the output activation of a served model’s graph, nodes (each {"op", "inputs", "outputs"}, a clip’s min and max where read) read back from its value output, as {"output_class", "op"}; null when the graph does not say.

cellmap_flow.portable.calls.rank_row(args, arrays)

rank.score_row: the ranking’s row from base (the score read through norm, which came from norm_from), stretched (the score read through norm stretched to raw, or null), raw (the raw’s window, or null) and others (what the other normalizations tried matched); null when base is null.

cellmap_flow.portable.calls.carry_paint(args, arrays)

The old volume’s paint carried onto the new grid (carry.carry). args: old and new (each a Grid’s fields), old_dtype, new_dtype and indices, the old painted chunks’; arrays: those chunks’ labels, whole, in that order. Answers the counts with indices, the new chunks’ in the order of the arrays beside them, each a whole chunk to write where it is not 0.