Nanoscipy

Latest version: v3.0.17

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

Scan your dependencies

Page 1 of 10

3.0.17

New Features and Changes
🟩🟦🟥`colors.py`
The file `colors.json` has been added to a new folder `__presets__`, which contains the color preset information previously contained within the function `color_presets()`. Thus, all changes made to this folder will affect the available presets from the color module.

All types of color preset figure creation has been changed to make use of matplotlib patches, which makes the feature much more reliable in all cases. This should also solve all scaling issues with the method.

`RandomColors`
This class has had the method `save()` added. Note the docstring:

Method that saves one or more generated colors according to the selected indexes and passed names.
:param indexes: A list of indexes to save. This can be just an int.
:param names: A list of names to save. This can be just a str.
:param overwrite: Regular behavior is False, in which case a color cannot be saved if the provided name already
exists. Setting this to True will permit overwriting of existing colors in the colors.json file.

Saved colors will be added to the `colors.json` file.

The auto-copy functionality has been removed in favor for a more solid preset save system using a local json file.

3.0.16

New Features and Changes
🟩`colors.py`
🟩`GRAY2RGB()`
This new function converts a grayscale image to instead be colorized with the HEX or RGB color provided. The function has the parameters:
`img` grayscale image from OpenCV
`rgb_col` desired RGB color in shape (r, g, b) or hex as 'HEXCODE'

🟦`setup.py`
Dependencies have been changed to make the package more easily installable.

🟥`functions.py`
🟥`file_select()`
Removed FlowCal package dependency. Thus, it is no longer possible to load flow calorimetry data through the function.

3.0.15

Solved deploy issue for v3.0.14.

3.0.14

New features
The `colors.py` has been added, which provides a set of color generator functions for data representation.

colors.osc_line()
A function that creates an oscillator line with given parameters. Returns a numpy array with the oscillator line points.
The function has the parameters:
`points` The amount of points there should be on the line.
`tt` The trigonometry type. Can be 'sin' or 'cos'. Default is 'sin'.
`lin` The linearity. Default is 1.
`gauge` Maximum amplitude span of the oscillator. Default is 0.5.
`freq` The frequency of the oscillator. Default is 4.
`min_shift` A minimum shift of the oscillator baseline. Default is 0.1.

colors.color_generator()
Generates an array of colors from an RGB spectrum through the oscillator line function. Returns a numpy array with the color spectrum points in the form ((R,G,B), ...). If cdict is True a the output will instead be ((R,G,B), ...), dict.
The function has the parameters:
`n` Number of colors to generate.
`tt` The trigonometry type for the R, G, and B channels. Can be 'sin' or 'cos'. Default is ('sin', 'sin', 'sin').
`lin` Linearity for the R, G, and B channels. Default is (1, 1, 1).
`gauge` Maximum amplitude span of the oscillator for the R, G, and B channels. Default is (0.5, 0.5, 0.5).
`freq` Frequency of the oscillator for the R, G, and B channels. Default is (4, 4, 4).
`random` If True the color spectra are generated randomly. Default is False.
`rf` Upper frequency limit for the R, G, and B channels. Default is 10.
`boldness` Introduces a minimim baseline for the R, G, and B channels. A higher value streamlines the color spectrum, such that a more easily pleasing spectrum is obtained. A lower value makes the colors in the spectrum more easily distinguishable. Default is 0.1.
`rb` The boldness limit for the R, G, and B channels. Default is 0.4.
`cdict` If True a dictionary with the function parameters is generated in addition to the colors from the generated spectrum. Default is False.

colors.color_presets()
Gives n amount of colors from a chosen color preset. Returns a numpy array with the color spectrum points in the form ((R,G,B), ...).
The function has the parameters:
`n` The number of colors to generate.
`preset` The preset from which the colors are generated. If preset is -1, a figure with all different presets is generated instead. Default is -1.

colors.RandomColors
A random color preset generator class.

.generate()
Generate random color preset. Creates a figure with the generated colors and defines the color parameter dictionary as ´self.cdict´.
`sets` The number of presets to generate.
`n` The number of colors to generate in each preset.
`max_frequency` Upper frequency limit for the R, G, and B channels. Default is 10.
`max_boldness` The boldness variation lower limit for the R, G, and B channels. Default is 0.4.

3.0.13

New features
mathpar.parser()
Now supports using input expressions with spaces.

unitpar.unit_abbreviator()
Now abbreviates SI unit derivatives in more situations than before.

Changes
modules.NumAn
.supported_physical_constants
Changed the way constants with units are displayed to be more in line with expectations.

Bug fixes
unitpar.unit_handler()
Fixed an issue where if multiple valid unit multiplication operations were performed in a row, the script would fail to remove the last multiplication symbol if there was a unitless quantity at the end, from the initial input equation, causing an IndexError, when solving the expression completely.

3.0.12

Bug fixes
mathpar.parser()
Fixed an issue where input expressions having the first element be `'-'` would sometimes be read and computed incorrectly.

Page 1 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.