Saravanan666/pypi-org huggingface dataset:
Package: scikit-stats
scikit-stats: statistics tools and utilitiesInstallationInstallscikit-statslike any other Python package:pip install scikit-statsor similar (use--user,virtualenv, etc. if you wish).Getting StartedThescikit-statsmodule includes modeling and hypothesis tests submodules. This a quick user guide to each submodule. Thebinderexamples are also a good way to get started.modelingThe modeling submodule includes theBayesian Block algorithmthat can be used to improve the binning of histograms. The visual improvement can be dramatic, and more importantly, this algorithm produces histograms that accurately represent the underlying distribution while being robust to statistical fluctuations. Here is a small example of the algorithm applied on Laplacian sampled data, compared to a histogram of this sample with a fine binning.>>>importnumpyasnp>>>importmatplotlib.pyplotasplt>>>fromskstats.modelingimportbayesian_blocks>>>data=np.random.laplace(size=10000)>>>blocks=bayesian_blocks(data)>>>plt.hist(data,bins=1000,label='Fine Binning',density=True,alpha=0.6)>>>plt.hist(data,bins=blocks,label='Bayesian Blocks',histtype='step',density=True,linewidth=2)>>>plt.legend(loc=2)hypotestsThis submodule provides tools to do hypothesis tests such as discovery test and computations of upper limits or confidence intervals. scikit-stats needs a fitting backend to perform computations such aszfit. Any fitting library can be used if their API is compatible  with scikit-stats (seeapi checks).We give here a simple example of a discovery test, usingzfitas backend, of gaussian signal with known mean and sigma over an exponential background.>>>importzfit>>>fromzfit.lossimportExtendedUnbinnedNLL>>>fromzfit.minimizeimportMinuit>>>bounds=(0.1,3.0)>>>obs=zfit.Space('x',limits=bounds)>>>bkg=np.random.exponential(0.5,300)>>>peak=np.random.normal(1.2,0.1,25)>>>data=np.concatenate((bkg,peak))>>>data=data[(data>bounds[0])&(data<bounds[1])]>>>N=data.size>>>data=zfit.Data.from_numpy(obs=obs,array=data)>>>lambda_=zfit.Parameter("lambda",-2.0,-4.0,-1.0)>>>Nsig=zfit.Parameter("Ns",20.,-20.,N)>>>Nbkg=zfit.Parameter("Nbkg",N,0.,N*1.1)>>>signal=Nsig*zfit.pdf.Gauss(obs=obs,mu=1.2,sigma=0.1)>>>background=Nbkg*zfit.pdf.Exponential(obs=obs,lambda_=lambda_)>>>loss=ExtendedUnbinnedNLL(model=signal+background,data=data)>>>fromskstats.hypotests.calculatorsimportAsymptoticCalculator>>>fromskstats.hypotestsimportDiscovery>>>fromskstats.hypotests.parametersimportPOI>>>calculator=AsymptoticCalculator(loss,Minuit())>>>poinull=POI(Nsig,0)>>>discovery_test=Discovery(calculator,[poinull])>>>discovery_test.result()p_valuefortheNullhypothesis=0.0007571045424956679Significance(inunitsofsigma)=3.1719464825102244The discovery test prints out the pvalue and the significance of the null hypothesis to be rejected.
Package: scikit-surgeryarucotracker
Author: Stephen Thompsonscikit-surgeryarucotracker provides a simple Python interface between OpenCV’s ARuCo marker tracking libraries and other Python packages designed around scikit-surgerytrackers. It allows you to treat an object tracked using ARuCo markers in the same way as an object tracked using other tracking hardware (e.g. aruco - scikit-surgerynditracker).scikit-surgeryarucotracker is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).scikit-surgeryarucotracker is tested with Python 3.6 and may support other Python versions.Installingpip install scikit-surgeryarucotrackerUsingConfiguration is done using Python libraries. Tracking data is returned in NumPy arrays.from sksurgeryarucotracker.arucotracker import ArUcoTracker
config = {
    "video source" : 0
        }
tracker = ArUcoTracker(config)

tracker.start_tracking()
print(tracker.get_frame())
tracker.stop_tracking()
tracker.close()DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgeryarucotrackerRunning the testsYou can run the unit tests by installing and running tox:pip install tox
toxContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2019 University College London.
scikit-surgeryarucotracker is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerybard
Author(s): Miguel Xochicale, Thomas Dowrick, Stephen Thompson and Matt Clarkson;
Contributor(s): Mian Ahmad.Basic Augmented Reality Demo (BARD) is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).The BARD is tested on Python 3.8. and may support other Python versions.DevelopingEncountering Problems?Please get in touch or raise anissue.ContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2019 University College London.
Basic Augmented Reality Demo. is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerybk
Author: Thomas Dowrickscikit-surgerybk is a Python library for interfacing with BK ultrasound machines, and is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).scikit-surgerybk supports Python 2.7 and Python 3.6/3.7/3.8.DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgerybkRunning testsPytest is used for running unit tests:pip install pytest
python -m pytestLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pip install pylint
pylint --rcfile=tests/pylintrc sksurgerybkInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/SciKit-Surgery/scikit-surgerybkContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2019 University College London.
scikit-surgerybk is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerycalibration
Author(s): Stephen Thompson; Contributor(s): Matt Clarkson, Thomas Dowrick and Miguel Xochicalescikit-surgerycalibration is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).scikit-surgerycalibration is tested on Python 3.7.scikit-surgerycalibration contains algorithms to perform calibrations useful during surgery, for example pointer calibration, ultrasound calibration, and camera calibration.Please explore the project structure, and request or implement your desired functionality.FeaturesPivot Calibrationfor pivot calibration.Calibrationof mono or stereo tracked video data, calculating camera intrinsics and handeye transformation.CloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgerycalibration
git clone git@github.com:SciKit-Surgery/scikit-surgerycalibration.git # Alternatively, use password-protected SSH key.DevelopingWe recommend usinganacondaorminicondato create a python 3.7 environment,
then usingtoxto install all dependencies inside a dedicatedvenv. We then use
githubactionsto run a matrix of builds for Windows, Linux and Mac and various python versions.All library dependencies are specified viarequirements-dev.txtwhich refers torequirements.txt.So, assuming eitheranacondaorminicondais installed, and your current working directory is the root directory of this project:conda create --name scikit-surgery python=3.7
conda activate scikit-surgery
pip install tox
toxAs thetoxcommand runs, it will install all dependencies in a sub-directory.tox/py37(Linux/Mac) or.tox\py37(Windows).toxwill also run pytest and linting for you.To run commands inside the same environment astox, you should:source .tox/py37/bin/activateon Linux/Mac, or if you are Windows user:.tox\py37\Scripts\activateThen you can run pytest, linting, or directly run python scripts, and
know that the environment was created correctly bytox.Generating documentationThe simplest way is again usingtox.tox -e docsthen opendocs/build/html/index.htmlin your browser.Running testsPytest is used for running unit tests:python -m pytest
pytest -v -s tests/algorithms/test_triangulate.py #example for individual testsLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pylint --rcfile=tests/pylintrc sksurgerycalibrationInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/SciKit-Surgery/scikit-surgerycalibrationContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2020 University College London.
scikit-surgerycalibration is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerycore
DescriptionSciKit-SurgeryCore implements algorithms and tools that are common to all SciKit-Surgery packages.SciKit-SurgeryCore is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).FeaturesAConfiguration Managerto load parameters from a .json fileATransform Managerto manage combinations of 4x4 transformation matricesCorresponding point(i.e Landmark) based registration, based onArun et al., 1987.Rotaiton/translation Matrix constructionandvalidation functions,
checking a numpy array is a camera matrix, rotation matrix, rigid transform etc.CitingIf you make use of SciKit-Surgery libraries in your work, please cite the following paper:Thompson S, Dowrick T, Ahmad M, et al.SciKit-Surgery: compact libraries for surgical navigation.International Journal of Computer Assisted Radiology and Surgery. May 2020.DOI: 10.1007/s11548-020-02180-5InstallingYou can pip install as follows:pip install scikit-surgerycoreDevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgerycore.gitRunning the testsYou can run the unit tests by installing and running tox:pip install tox
 toxContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2018 University College London.
scikit-surgerycore is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerydavinci
Augmented reality for image-guided laproscopic surgery.scikit-surgerydavinci is part of theSNAPPYsoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).Author: Thomas Dowrickscikit-surgerydavinci supports Python 3.6.InstallingYou can install using pip:pip install scikit-surgerydavinciExample UsageSingle video feed:python sksurgerydavinci -s 0 -m MODEL_DIR-m specifies the location of a directory containing vtl/stl/vtp/ply models.Stereo video feed:python sksurgerydavinci -s 0 1 -m MODEL_DIRMock stereo feed using only one input:python sksurgerydavinci -s 0 -1 -m MODEL_DIRIf 3 or more screens are available, each video feed will run full screen on a separate display.
Video feeds can be assigned to specific displays using the -o arugment:python sksurgerydavinci -s 0 1 -o 2 3 1More details on command line arguments can be viewed using:python sksurgerydavinci -hContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2019 University College London.
scikit-surgerydavinci is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgery-evaluation
Author: Stephen Thompsonscikit-surgery-evaluation provides an application to evaluate surgical skills. You can provide a set of unstructured grids representing a set of locations that the user is then expected to target using a tracked pointer, utilising a SciKit-Surgery tracking library (scikit-surgeryarucotracker, or scikit-surgerynditracker). You can specify paths for the user to follow, or let the system select target meshes automatically.scikit-surgery-evaluation is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).scikit-surgery-evaluation supports Python 3.X.python sksurgeryeval.py -c configuration.jsonDevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgery-evaluationRunning testsPytest is used for running unit tests:pip install pytest
python -m pytestLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pip install pylint
pylint --rcfile=tests/pylintrc sksurgeryevalInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/SciKit-Surgery/scikit-surgery-evaluationContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2019 University College London.
scikit-surgery-evaluation is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgeryfred
Author: Stephen ThompsonThis is the Fiducial Registration Educational Demonstration (SciKit-SurgeryFRED), part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).Fiducial Registration Educational Demonstration is intended to be used as part of an online tutorial in using fiducial based registration. The tutorial covers the basic theory of fiducial based registration, which is used widely in image guided interventions. The tutorial aims to help the students develop an intuitive understanding of key concepts in fiducial based registration, including Fiducial Localisation Error, Fiducial Registration Error, and Target Registration Error.CitingIf you use SciKit-SurgeryFRED in your research or teaching please cite our paper:Stephen Thompson, Tom Dowrick, Mian Ahmad, Jeremy Opie, and Matthew J. Clarkson “Are fiducial registration error and target registration error correlated? SciKit-SurgeryFRED for teaching and research”, Proc. SPIE 11598, Medical Imaging 2021: Image-Guided Procedures, Robotic Interventions, and Modeling, 115980U (15 February 2021);https://doi.org/10.1117/12.2580159Specific releases can be cited via the Zenodo tag.SciKit-Surgery can also be cited as:Thompson S, Dowrick T, Ahmad M, et al. “SciKit-Surgery: compact libraries for surgical navigation.” International Journal of Computer Assisted Radiology and Surgery. 2020 May.https://doi.org/10.1007/s11548-020-02180-5DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgeryfredContributingPlease see thecontributing guidelines.Useful linksSource code repositoryLicensing and copyrightCopyright 2020 University College London.
Fiducial Registration Educational Demonstration is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgeryfredbackend
Author: Stephen ThompsonFiducial Registration Educational Demonstration (SciKit-SurgeryFRED) is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL). This repository only contains the backend functions, not any user interface.Fiducial Registration Educational Demonstration is tested with Python 3.XFiducial Registration Educational Demonstration is intended to be used as part of an online tutorial in using fiducial based registration. The tutorial covers the basic theory of fiducial based registration, which is used widely in image guided interventions. The tutorial aims to help the students develop an intuitive understanding of key concepts in fiducial based registration, including Fiducial Localisation Error, Fiducial Registration Error, and Target Registration Error.Please explore the project structure, and implement your own functionality.CitingIf you use SciKit-SurgeryFRED in your research or teaching please cite it. Individual releases can be cited via the Zenodo tag. SciKit-Surgery should be cited as:Thompson S, Dowrick T, Ahmad M, et al. “SciKit-Surgery: compact libraries for surgical navigation.” International Journal of Computer Assisted Radiology and Surgery. 2020 May. DOI: 10.1007/s11548-020-02180-5.DevelopingCloningYou can clone the repository using the following command:git clone https://github.com/UCL/scikit-surgeryfredbackendRunning testsPytest is used for running unit tests:pip install pytest
python -m pytestLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pip install pylint
pylint --rcfile=tests/pylintrc sksurgeryfredbackendInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/UCL/scikit-surgeryfredbackendContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2020 University College London.
Fiducial Registration Educational Demonstration is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerygoicp
scikit-surgerygoicpPurposeThis is a re-wrapping of the GoICP algorithm inhttps://github.com/aalavandhaann/go-icp_cythonusing PyBind11.pip install scikit-surgerygoicpWorking on Ubunutu (Python 3.6, 3.7, 3.8), Mac (3.6, 3.7, 3.8) and Windows (3.6, 3.7)UsageOnly the below classes have been wrapped:GoICPPOINT3DROTNODETRANSNODEA simplified usage is shown below. SeeTesting/test.pyfor a full example.import numpy as np;
from sksurgerygoicppython import GoICP, POINT3D, ROTNODE, TRANSNODE;

def loadPointCloud(filename):
    pcloud = np.loadtxt(filename, skiprows=1);
    plist = pcloud.tolist();
    p3dlist = [];
    for x,y,z in plist:
        pt = POINT3D(x,y,z);
        p3dlist.append(pt);
    return pcloud.shape[0], p3dlist;

goicp = GoICP();
Nm, a_points = loadPointCloud('./Testing/Data/model_bunny.txt');
Nd, b_points = loadPointCloud('./Testing/Data/data_bunny.txt');
goicp.loadModelAndData(Nm, a_points, Nd, b_points);
goicp.setDTSizeAndFactor(300, 2.0);
goicp.BuildDT();
goicp.Register();
print(goicp.optimalRotation()); # A python list of 3x3 is returned with the optimal rotation
print(goicp.optimalTranslation());# A python list of 1x3 is returned with the optimal translationCreditshttps://github.com/aalavandhaann/go-icp_cythonhttps://github.com/yangjiaolong/Go-ICPPreferred Branching Workflow for Contributions.We welcome contributions to this project. Please use the following workflow.Raise issue in this project's Github Issue Tracker.Fork repository.Create a feature branch called<issue-number>-<some-short-description>replacing<issue-number>with the Github issue number
and<some-short-description>with your description of the thing you are implementing.Code on that branch.Push to your remote when ready.Create pull request.We will review code, suggest and required changes and merge to master when it is ready.
Package: scikit-surgeryimage
scikit-surgeryimage is a python only project to implement image processing algorithms
that are useful for image-guided surgery.scikit-surgeryimage was developed at theWellcome EPSRC Centre for Interventional and Surgical SciencesinUniversity College London (UCL).Featuresrequirements.txt specifies a dependency on opencv-contrib-python-headless, so you can use any OpenCV python therein.
In addition, this project provides:Convenience classesfor video read and write.Utilitiesto detect the number of cameras and prepare text for overlay on video.APointDetectorinterface for video camera calibration and implementations such as OpenCV chessboard, ArUco, ChArUco and combinations.GenerateChArUcopatternsInterlacing and deinterlacing.Convenience wrappers forerosion and dilation.InstallingYou can pip install directly from the repository as follows:pip install scikit-surgeryimageDevelopingYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgeryimageRunning the testsYou can run the unit tests by installing and running tox:pip install tox
toxEncountering Problems?Please check list ofcommon issues.ContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2018 University College London.
scikit-surgeryimage is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: scikit-surgerynditracker
scikit-surgerynditracker is a python interface for Northern Digital (NDI) trackers. It should work with Polaris Vicra, Spectra, and Vega optical trackers and Aurora electromagnetic trackers. Tracking data is output as NumPy arrays.Author: Stephen Thompsonscikit-surgerynditracker is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).Installingpip install scikit-surgerynditrackerUsingConfiguration is done using Python libraries at instantiation. Invalid
configuration should raise exceptions. Tracking data is returned in a set of
lists, containing the port handles, timestamps, framenumbers, the tracking data
and a tracking quality metric. By default tracking data is returned as a 4x4 NumPy array,
though can be returned as a quaternion by changing the configuration.from sksurgerynditracker.nditracker import NDITracker
SETTINGS = {
    "tracker type": "polaris",
    "romfiles" : ["../data/8700339.rom"]
        }
TRACKER = NDITracker(SETTINGS)

TRACKER.start_tracking()
port_handles, timestamps, framenumbers, tracking, quality = TRACKER.get_frame()
for t in tracking:
  print (t)
TRACKER.stop_tracking()
TRACKER.close()See demo.py for a full exampleDevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/scikit-surgerynditrackerRunning the testsYou can run the unit tests by installing and running tox:pip install tox
toxContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2018 University College London.
scikit-surgerynditracker is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.