Searchstims

Latest version: v2.4.0

Safety actively analyzes 613797 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

2.4.0

Added
- `background_color` argument to `AbstractStimMaker`
+ makes it possible to specify background color of search stimuli
(e.g., white instead of default black)

2.3.1

Changed
- both `searchstims.make` and `searchstims.utils.json_to_csv` function
save `root_output_dir` field in csv as absolute path

2.3.0

Added
- other `StimMaker` classes
- `searchstims.util` module with `make_csv` and `json_to_csv` functions
+ the `searchstims.make` function now calls `make_csv` after making
the images, see below
+ the `json_to_csv` function is for converting the `.json` files that
used to be generated with metadata to the new `.csv` files
+ it also generates individual `.meta.json` files for each image as
`searchstims.make` now does

Changed
- `searchstims.make` now outputs a .csv file instead of a .json file
+ meaning metadata for each image is now in long-form that's easy to
parse with a library like Pandas, instead of a confusing nested
dictionaries-list structure
+ some metadata like item locations does not fit well in table format
so that data is saved in individual `.meta.json` files, one for each
`.png` image file.
- specifically, the `.meta.json` files contain
+ `target_indices`: location of target, if present; i.e. the
indices to access the center of the target in an array
representing the image
+ `distractor_indices`: same as `target_indices` but for
distractor items in the search stimulus
+ `grid_as_char`: when stimulus was generated using a grid of
cells, this character representation of the grid and where the
items are within it is added to the `.meta.json` file. This can
be an easy way to filter by location at the level of the grid,
- change `Two_v_Five_StimMaker` to use ForcedSquare font instead of .png
files
+ This makes it possible to easily change size of 2 and 5.

2.2.0

Added
- ability to pass `list` for `num_target_present` and `num_target_absent` in `searchstims.make`
+ to make more of one set size v. another, since "combinatorially speaking" there are many more
ways of making stimuli with larger set sizes, and this seems to affect accuracy on those set
sizes. E.g. with grid of size (5x5) there are 25 pick 1, i.e. 25, ways of making a "target
present" stimulus with set size of 1, whereas with a set size of 8 there are 25 pick 8
(~100k) ways of making a target present stimulus (and that's before adding jitter).

2.1.0

Added
- `RVvRHGVStimMaker` class that makes "conjunction" search stimuli

Changed
- refactor `AbstractStimMaker`
+ move core logic for making a single visual search stimulus into helper function `_make_stim`
which is called by `make_stim` in main loop after all the set-up code
+ that way child classes of `AbstractStimMaker` can override `_make_stim` if they need to do
something more complicated than what it does

2.0.0

Added
- ability to specify colors for targets and distractors as tuples corresponding to
RGB color codes; currently this only works if you write your own script, not if you use `config.ini` files

Changed
- names of built-in visual search stimuli are now `RVvGV` and `2_v_5`, hence the major version bump

Fixed
- bug that prevented user from making search stimuli where items are placed randomly instead of
on a grid

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.