BF Add ordinal prefix to tmp files and sort appropriately to maintain… #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Anisha,
Two small fixes here - the first is just removing some diffs that were somehow committed, causing the example.ipynb to break and be invalid json.
The second is a trick to force tmp files to always be sorted consistently. This allows you to use lists of both images and options that will match in the same order. What was happening before was the the images were being copied into a local dir with a unique, autogenerated names. But this actually changed the order of the images stochastically, so that the keys were mapping back haphazardly, causing each LUT option to map to each image randomly. To fix this I appended a prefix to each one and sort them, so that the first image in the list always has the first tmp image, etc., and the key mapping works correctly. This allows you to match options and images, e.g. for positive and negative maps:
Otherwise, the tmp filenames map all weird, and re-running will shuffle the three option lists so that they map randomly at each call to the notebook cell.