diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 65efc3352..eeff72524 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,11 +2,11 @@ # Introduction -This code of conduct applies to all spaces managed by the fastplotlib project, -including all public and private mailing lists, issue trackers, wikis, blogs, -Twitter, and any other communication channel used by our community, including -any in-person events, whether directly organized by fastplotlib developers -or associated people. +This code of conduct applies to all spaces managed by the fastplotlib project, +including all public and private mailing lists, issue trackers, wikis, blogs, +Twitter, and any other communication channel used by our community, including +any in-person events, whether directly organized by fastplotlib developers +or associated people. This code of conduct should be honored by everyone who participates in the fastplotlib community formally or informally, or claims any affiliation with the @@ -102,7 +102,7 @@ most appropriate). If you would prefer not to do that, please feel free to report to the Code of Conduct committee directly, or ask the committee for advice, in confidence. -You can report issues to the fastplotlib core team: +You can report issues to the fastplotlib core team: [Kushal Kolar](https://github.com/kushalkolar) [Caitlin Lewis](https://github.com/clewis7) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be9e175e6..71957c77f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,7 +124,7 @@ git push origin my_feature_branch > **_NOTE:_** If your contributions modify how visualizations _look_, see the [Testing details](#testing-details) section at the very bottom. > **_NOTE:_** If your contributions modify the API, you must regenerate the API docs before making a PR, see -> the [Documenation](#documentation) section below. +> the [Documentation](#documentation) section below. ### Contributing your changes back to `fastplotlib` diff --git a/GOVERNANCE.md b/GOVERNANCE.md index e7e4fc8f4..60853378f 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -68,7 +68,7 @@ Responsibilities: 1. Only individuals, not organizations, may be added to the leadership team. A candidate individual must be nominated by a current member of the leadership team. 2. A candidate must: * Be committed to the fastplotlib mission. - * Have demonstrated contibutions to `fastplotlib` through one of: + * Have demonstrated contributions to `fastplotlib` through one of: * Significant contributions to the codebase. * Significant application of fastplotlib in a dependent package. * Significant technical guidance or feedback on the development of `fastplotlib`. diff --git a/docs/source/api/graphics/LineCollection.rst b/docs/source/api/graphics/LineCollection.rst index ad4b7f929..005675d48 100644 --- a/docs/source/api/graphics/LineCollection.rst +++ b/docs/source/api/graphics/LineCollection.rst @@ -59,4 +59,3 @@ Methods LineCollection.rotate LineCollection.share_property LineCollection.unshare_property - diff --git a/docs/source/api/graphics/LineStack.rst b/docs/source/api/graphics/LineStack.rst index db060a4c2..9706771e5 100644 --- a/docs/source/api/graphics/LineStack.rst +++ b/docs/source/api/graphics/LineStack.rst @@ -59,4 +59,3 @@ Methods LineStack.rotate LineStack.share_property LineStack.unshare_property - diff --git a/docs/source/user_guide/guide.rst b/docs/source/user_guide/guide.rst index d544c42a3..ab68382f9 100644 --- a/docs/source/user_guide/guide.rst +++ b/docs/source/user_guide/guide.rst @@ -661,7 +661,7 @@ For more information on the various spaces used by rendering engines please see Imgui ----- -Fastplotlib uses `imgui_bundle `_ to provide within-canvas UI elemenents if you +Fastplotlib uses `imgui_bundle `_ to provide within-canvas UI elements if you installed ``fastplotlib`` using the ``imgui`` toggle, i.e. ``fastplotlib[imgui]``, or installed ``imgui_bundle`` afterwards. Fastplotlib comes built-in with imgui UIs for subplot toolbars and a standard right-click menu with a number of options. diff --git a/examples/line/line_cmap_more.py b/examples/line/line_cmap_more.py index 37fd68cdb..757298d8d 100644 --- a/examples/line/line_cmap_more.py +++ b/examples/line/line_cmap_more.py @@ -33,7 +33,7 @@ # i.e., the color is a function of sine(x) line2 = figure[0, 0].add_line(sine, thickness=10, cmap="jet", cmap_transform=sine[:, 1], offset=(0, 4, 0)) -# make a line and change the cmap afterward, here we are using the cosine instead fot the transform +# make a line and change the cmap afterward, here we are using the cosine instead for the transform line3 = figure[0, 0].add_line(sine, thickness=10, cmap="jet", cmap_transform=cosine[:, 1], offset=(0, 6, 0)) # change the cmap line3.cmap = "bwr" diff --git a/examples/line_collection/line_collection_colors.py b/examples/line_collection/line_collection_colors.py index 1d9eff45d..49cb1b975 100644 --- a/examples/line_collection/line_collection_colors.py +++ b/examples/line_collection/line_collection_colors.py @@ -2,7 +2,7 @@ Line Collection Colors ====================== -Example showing one way ot setting colors for individual lines in a collection +Example showing one way of setting colors for individual lines in a collection """ # test_example = true diff --git a/examples/machine_learning/covariance.py b/examples/machine_learning/covariance.py index 84c5bf531..1d45c6fc7 100644 --- a/examples/machine_learning/covariance.py +++ b/examples/machine_learning/covariance.py @@ -31,7 +31,7 @@ X = X.T cov = X @ X.T / X.shape[1] -# reshaped image for each sample wil be 64 x 64 pixels +# reshaped image for each sample will be 64 x 64 pixels img = cov[0].reshape(64, 64) # figure kwargs for image widget diff --git a/examples/misc/em_wave_animation.py b/examples/misc/em_wave_animation.py index 06c60ccaf..a22f2a3fa 100644 --- a/examples/misc/em_wave_animation.py +++ b/examples/misc/em_wave_animation.py @@ -19,7 +19,7 @@ start, stop = 0, 4 * np.pi -# let's define the x, y and z axes for each with direction of wave propogation along the z-axis +# let's define the x, y and z axes for each with direction of wave propagation along the z-axis # electric field in the xz plane travelling along zs = np.linspace(start, stop, 200) e_ys = np.zeros(200) diff --git a/examples/notebooks/multiprocessing_zmq/multiprocessing_zmq_plot.ipynb b/examples/notebooks/multiprocessing_zmq/multiprocessing_zmq_plot.ipynb index 564512451..706f82b90 100644 --- a/examples/notebooks/multiprocessing_zmq/multiprocessing_zmq_plot.ipynb +++ b/examples/notebooks/multiprocessing_zmq/multiprocessing_zmq_plot.ipynb @@ -67,7 +67,7 @@ "fig[0, 0].add_image(data, name=\"image\")\n", "\n", "def update_frame(subplot):\n", - " # recieve bytes\n", + " # receive bytes\n", " b = get_bytes()\n", " \n", " if b is not None:\n", diff --git a/examples/notebooks/nb_test_utils.py b/examples/notebooks/nb_test_utils.py index f1505f98a..08a65b837 100644 --- a/examples/notebooks/nb_test_utils.py +++ b/examples/notebooks/nb_test_utils.py @@ -48,12 +48,12 @@ def rgba_to_rgb(img: np.ndarray) -> np.ndarray: def image_similarity(src, target, threshold=0.2): """Compute normalized RMSE 0..1 and decide if similar based on threshold. - For every pixel, the euclidian distance between RGB values is computed, + For every pixel, the euclidean distance between RGB values is computed, and normalized by the maximum possible distance (between black and white). The RMSE is then computed from those errors. The normalized RMSE is used to compute the - similarity metric, so larger errors (euclidian distance + similarity metric, so larger errors (euclidean distance between two RGB colors) will have a disproportionately larger effect on the score than smaller errors. diff --git a/examples/notebooks/quickstart.ipynb b/examples/notebooks/quickstart.ipynb index 737aee3e7..5c3c6beec 100644 --- a/examples/notebooks/quickstart.ipynb +++ b/examples/notebooks/quickstart.ipynb @@ -858,7 +858,7 @@ "id": "c29f81f9-601b-49f4-b20c-575c56e58026", "metadata": {}, "source": [ - "## Graphic _data_ is also slicable and settable" + "## Graphic _data_ is also sliceable and settable" ] }, { @@ -1119,7 +1119,7 @@ "metadata": {}, "outputs": [], "source": [ - "# change the FOV of the persepctive camera\n", + "# change the FOV of the perspective camera\n", "fig_l3d[0, 0].camera.fov = 70" ] }, @@ -1197,7 +1197,7 @@ "\n", "start, stop = 0, 4 * np.pi\n", "\n", - "# let's define the x, y and z axes for each with direction of wave propogation along the z-axis\n", + "# let's define the x, y and z axes for each with direction of wave propagation along the z-axis\n", "# electric field in the xz plane travelling along\n", "zs = np.linspace(start, stop, 200)\n", "e_ys = np.zeros(200)\n", diff --git a/examples/selection_tools/unit_circle.py b/examples/selection_tools/unit_circle.py index 76f6a207c..0d791b939 100644 --- a/examples/selection_tools/unit_circle.py +++ b/examples/selection_tools/unit_circle.py @@ -19,7 +19,7 @@ import fastplotlib as fpl -# helper function to make a cirlce +# helper function to make a circle def make_circle(center, radius: float, n_points: int) -> np.ndarray: theta = np.linspace(0, 2 * np.pi, n_points) xs = radius * np.cos(theta) @@ -52,7 +52,7 @@ def make_circle(center, radius: float, n_points: int) -> np.ndarray: ) # line to show the circle radius -# use it to indicate the current position of the sine and cosine selctors (below) +# use it to indicate the current position of the sine and cosine selectors (below) radius_data = np.array([[0, 0, 0], [*circle_data[0], 0]]) circle_radius = figure["unit circle"].add_line( radius_data, thickness=6, colors="magenta" diff --git a/examples/tests/testutils.py b/examples/tests/testutils.py index f72a87123..1091cf8cb 100644 --- a/examples/tests/testutils.py +++ b/examples/tests/testutils.py @@ -76,12 +76,12 @@ def find_examples(query=None, negative_query=None, return_stems=False): def image_similarity(src, target, threshold=0.2): """Compute normalized RMSE 0..1 and decide if similar based on threshold. - For every pixel, the euclidian distance between RGB values is computed, + For every pixel, the euclidean distance between RGB values is computed, and normalized by the maximum possible distance (between black and white). The RMSE is then computed from those errors. The normalized RMSE is used to compute the - similarity metric, so larger errors (euclidian distance + similarity metric, so larger errors (euclidean distance between two RGB colors) will have a disproportionately larger effect on the score than smaller errors. @@ -227,11 +227,11 @@ def generate_diff(src, target, fuzz=0.05): """ Generate an image that highlights the differences between src and target image - any pixels with a euclidian color distance < fuzz will be ignored + any pixels with a euclidean color distance < fuzz will be ignored fuzz is expressed as a percentage of the maximum possible distance which is the distance between (0,0,0) and (1,1,1) = sqrt(3). """ - # compute euclidian distance between pixels + # compute euclidean distance between pixels # and normalize to 0..1 max_dist = np.linalg.norm([1, 1, 1], axis=-1) error = np.linalg.norm(np.abs(target - src), axis=-1) / max_dist diff --git a/fastplotlib/graphics/_axes.py b/fastplotlib/graphics/_axes.py index 4938b1a97..8a4ea23eb 100644 --- a/fastplotlib/graphics/_axes.py +++ b/fastplotlib/graphics/_axes.py @@ -575,7 +575,7 @@ def update_using_camera(self): (xscreen_10, yscreen_10) ) else: - # force origin since None is not supported for Persepctive projections + # force origin since None is not supported for Perspective projections self._intersection = (0, 0, 0) intersection = self._intersection diff --git a/fastplotlib/graphics/_collection_base.py b/fastplotlib/graphics/_collection_base.py index 36f83ec7a..53722ff39 100644 --- a/fastplotlib/graphics/_collection_base.py +++ b/fastplotlib/graphics/_collection_base.py @@ -59,12 +59,12 @@ def rotations(self, values: np.ndarray | list[np.ndarray]): # TODO: how to work with deleted feature in a collection @property - def visibles(self) -> np.ndarray[bool]: + def visible(self) -> np.ndarray[bool]: """get or set the offsets of the individual graphics in the collection""" return np.asarray([g.visible for g in self]) - @visibles.setter - def visibles(self, values: np.ndarray[bool] | list[bool]): + @visible.setter + def visible(self, values: np.ndarray[bool] | list[bool]): self._set_feature("visible", values) diff --git a/fastplotlib/graphics/_features/_base.py b/fastplotlib/graphics/_features/_base.py index 1088dc005..1917f80cc 100644 --- a/fastplotlib/graphics/_features/_base.py +++ b/fastplotlib/graphics/_features/_base.py @@ -38,7 +38,7 @@ class FeatureEvent(pygfx.Event): +------------+-------------+-----------------------------------------------+ | target | WorldObject | pygfx rendering engine object for the graphic | +------------+-------------+-----------------------------------------------+ - | time_stamp | float | time when the event occured, in ms | + | time_stamp | float | time when the event occurred, in ms | +------------+-------------+-----------------------------------------------+ """ diff --git a/fastplotlib/graphics/line_collection.py b/fastplotlib/graphics/line_collection.py index c4af5dddc..f073b3f9d 100644 --- a/fastplotlib/graphics/line_collection.py +++ b/fastplotlib/graphics/line_collection.py @@ -179,7 +179,7 @@ def __init__( names of the individual lines in the collection, ``len(names)`` must equal ``len(data)`` metadata: Any - meatadata associated with the collection as a whole + metadata associated with the collection as a whole metadatas: Iterable or array metadata for each individual line associated with this collection, this is for the user to manage. diff --git a/fastplotlib/graphics/selectors/_rectangle.py b/fastplotlib/graphics/selectors/_rectangle.py index 51c3209b1..39d66d006 100644 --- a/fastplotlib/graphics/selectors/_rectangle.py +++ b/fastplotlib/graphics/selectors/_rectangle.py @@ -435,7 +435,7 @@ def get_selected_indices( Returns ------- Union[np.ndarray, List[np.ndarray]] - data indicies of the selection + data indices of the selection | tuple of [row_indices, col_indices] if the graphic is an image | list of indices along the x-dimension for each line if graphic is a line collection | array of indices along the x-dimension if graphic is a line diff --git a/fastplotlib/layouts/_graphic_methods_mixin.py b/fastplotlib/layouts/_graphic_methods_mixin.py index a08e9b110..d2ade4951 100644 --- a/fastplotlib/layouts/_graphic_methods_mixin.py +++ b/fastplotlib/layouts/_graphic_methods_mixin.py @@ -143,7 +143,7 @@ def add_line_collection( names of the individual lines in the collection, ``len(names)`` must equal ``len(data)`` metadata: Any - meatadata associated with the collection as a whole + metadata associated with the collection as a whole metadatas: Iterable or array metadata for each individual line associated with this collection, this is for the user to manage. diff --git a/fastplotlib/tools/_histogram_lut.py b/fastplotlib/tools/_histogram_lut.py index b8c6633a8..2054bd5cf 100644 --- a/fastplotlib/tools/_histogram_lut.py +++ b/fastplotlib/tools/_histogram_lut.py @@ -39,7 +39,7 @@ def __init__( ---------- data image_graphic - nbins: int, defaut 100. + nbins: int, default 100. Total number of bins used in the histogram flank_divisor: float, default 5.0. Fraction of empty histogram bins on the tails of the distribution set `np.inf` for no flanks diff --git a/fastplotlib/ui/_base.py b/fastplotlib/ui/_base.py index 6c134d415..407421b28 100644 --- a/fastplotlib/ui/_base.py +++ b/fastplotlib/ui/_base.py @@ -97,7 +97,7 @@ def __init__( additional args for the GUI **kwargs - additional kwargs for teh GUI + additional kwargs for the GUI """ super().__init__() diff --git a/fastplotlib/utils/_plot_helpers.py b/fastplotlib/utils/_plot_helpers.py index 5a39b76d0..6c50aebd4 100644 --- a/fastplotlib/utils/_plot_helpers.py +++ b/fastplotlib/utils/_plot_helpers.py @@ -12,7 +12,7 @@ def get_nearest_graphics_indices( ) -> np.ndarray[int]: """ Returns indices of the nearest ``graphics`` to the passed position ``pos`` in world space - in order of closest to furtherst. Uses the distance between ``pos`` and the center of the + in order of closest to furthest. Uses the distance between ``pos`` and the center of the bounding sphere for each graphic. Parameters diff --git a/fastplotlib/utils/gui.py b/fastplotlib/utils/gui.py index 6a0d8dfdc..b7b2da64d 100644 --- a/fastplotlib/utils/gui.py +++ b/fastplotlib/utils/gui.py @@ -89,16 +89,16 @@ def _notebook_print_banner(): device = adapter["device"] if atype in ("DiscreteGPU", "IntegratedGPU") and backend != "OpenGL": - charactor = chr(0x2705) # green checkmark + character = chr(0x2705) # green checkmark tooltip = "This adapter can be used with fastplotlib" elif backend == "OpenGL": - charactor = chr(0x0000274C) # red x + character = chr(0x0000274C) # red x tooltip = "This adapter cannot be used with fastplotlib" elif device.startswith("llvmpipe") or atype == "CPU": - charactor = f"{chr(0x00002757)} limited" # red ! + character = f"{chr(0x00002757)} limited" # red ! tooltip = "CPU rendering support is limited and mainly for testing purposes" else: - charactor = f"{chr(0x00002757)} unknown" # red ! + character = f"{chr(0x00002757)} unknown" # red ! tooltip = "Unknown adapter type and backend" if ix == default_ix: @@ -109,7 +109,7 @@ def _notebook_print_banner(): # add row to HTML table table_str += f'' # add each element to this row - for s in [f"{charactor}{default}", device, atype, backend, driver]: + for s in [f"{character}{default}", device, atype, backend, driver]: table_str += f"{s}" table_str += ""