This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest | |
| # UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows | |
| sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb | |
| ### Uncomment below line if you have not installed gdebi-core before | |
| # sudo apt-get install gdebi-core | |
| sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb | |
| # UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def align_vectorised(a: np.ndarray, b: np.ndarray): | |
| """ | |
| Find array of rotation matrices r such that r @ a = b when a and b are arrays of normalised vectors | |
| implementation designed to avoid trig calls | |
| based on https://iquilezles.org/www/articles/noacos/noacos.htm | |
| :param a: normalised vector(s) of length 3 | |
| :param b: normalised vector(s) of length 3 | |
| :return: rotation matrix | |
| """ | |
| # setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def random_uniform_rotation(size=1): | |
| """ | |
| Return uniform rotation vectors sampled on a sphere | |
| Args: | |
| size : int | |
| The number of vectors | |
| Returns: | |
| vector: np.ndarray | |
| The rotation vectors | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from time import sleep | |
| import napari | |
| import numpy as np | |
| from napari.qt.threading import thread_worker | |
| viewer = napari.Viewer() | |
| bbox_layer = viewer.add_points( | |
| [[-1, -1], [-1, 1], [1, -1], [1, 1]], face_color='green') | |
| points_layer = viewer.add_points([0, 0], face_color='magenta') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from time import sleep | |
| from enum import Enum | |
| import napari | |
| import numpy as np | |
| import psygnal | |
| from napari.qt.threading import thread_worker | |
| BOARD_SIZE = 14 | |
| INITIAL_SNAKE_LENGTH = 4 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pathlib import Path | |
| import mrcfile | |
| import napari | |
| import numpy as np | |
| from magicgui import magicgui | |
| OUTPUT_DIRECTORY = 'picking' | |
| Path(OUTPUT_DIRECTORY).mkdir(exist_ok=True, parents=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pathlib import Path | |
| from typing import Dict | |
| from enum import Enum | |
| import napari | |
| import numpy as np | |
| import mrcfile | |
| import pandas as pd | |
| import starfile | |
| import eulerangles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import mrcfile | |
| import starfile | |
| from eulerangles import euler2matrix, invert_rotation_matrices | |
| import napari | |
| from fuzzywuzzy import fuzz, process | |
| # Read in data | |
| particle_file = 'particles_10.00Apx.star' | |
| volume_file = 'TS_01.mrc_10.00Apx.mrc' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main |