Skip to main content

Bindings for psydapt (https://github.com/aforren1/psydapt)

Project description

Python bindings to https://github.com/aforren1/psydapt.

To install, either install from PyPI (pip install psydapt), or find the latest wheels under "Artifacts" here: https://github.com/aforren1/psydapt-py/actions. Windows users may need the Microsoft Visual C++ runtime DLLs. One easy way to acquire those is via pip install msvc-runtime.

For now, see the C++ documentation for details: https://aforren1.github.io/psydapt/index.html

See the demos/ folder for examples.

from psydapt import Scale
import psydapt.questplus as qp
from psydapt.staircase import Staircase
from psydapt.questplus import Weibull

x = Staircase(
    start_val=0.5,
    n_reversals=3,
    step_sizes=[0.01, 0.001],
    n_trials=20,
    n_up=4,
    n_down=3,
    apply_initial_rule=True,
    stim_scale=Scale.Linear,
    min_val=0
)

intensities = [-3.5, -3.25, -3, -2.75, -2.5,
               -2.25, -2, -1.75, -1.5, -1.25,
               -1, -0.75, -0.5]
y = Weibull(
    stim_scale=Scale.Log10,
    intensity=intensities,
    threshold=intensities,
    slope=[0.5, 4.125, 7.75, 11.375, 15],
    lower_asymptote=[0.01, 0.1325, 0.255, 0.3775, 0.5],
    lapse_rate=[0.01],
    stim_selection_method=qp.StimSelectionMethod.MinEntropy, # only MinEntropy for now
    param_estimation_method=qp.ParamEstimationMethod.Mean, # currently unused
    n=5, # currently unused
    max_consecutive_reps=2, # currently unused
    random_seed=1 # currently unused
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for psydapt, version 0.1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size psydapt-0.1.3.0.zip (9.2 kB) File type Source Python version None Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp39-cp39-win_amd64.whl (175.6 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp39-cp39-manylinux2010_x86_64.whl (231.1 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp39-cp39-macosx_10_14_x86_64.whl (200.9 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp38-cp38-win_amd64.whl (178.0 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp38-cp38-manylinux2010_x86_64.whl (230.7 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp38-cp38-macosx_10_14_x86_64.whl (200.7 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp37-cp37m-win_amd64.whl (177.7 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp37-cp37m-manylinux2010_x86_64.whl (230.5 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp37-cp37m-macosx_10_14_x86_64.whl (197.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp36-cp36m-win_amd64.whl (177.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp36-cp36m-manylinux2010_x86_64.whl (230.5 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size psydapt-0.1.3.0-cp36-cp36m-macosx_10_14_x86_64.whl (196.9 kB) File type Wheel Python version cp36 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page