Skip to main content
Ctrl+K

pypillometry

  • Getting started
  • User guide
  • Tutorials
  • API reference
  • Experimental features
  • Development
  • GitHub
  • PyPI
  • Getting started
  • User guide
  • Tutorials
  • API reference
  • Experimental features
  • Development
  • GitHub
  • PyPI

Section Navigation

  • Data classes
    • EyeData
    • EyeDataDict
    • MaskPolicy
    • FakeEyeData
    • keephistory
    • QualityReport
    • QualityMetric
    • Table
    • RecordDict
  • Pupil methods (d.pupil)
    • PupilNamespace
  • Gaze methods (d.gaze)
    • GazeNamespace
  • Pipelines
    • crop
    • downsample
    • scale
    • unscale
    • merge_eyes
    • reset_time
    • mask_intervals
    • interpolate_intervals
    • exclude_intervals
    • keep_intervals
    • remove_intervals
    • merge_masks
    • clear_layer
    • set_blinks
    • set_events
    • add_events
    • set_experimental_setup
    • drop_data
    • drop_original
    • fill_time_discontinuities
    • Step
    • Pipeline
  • Events and intervals
    • Events
    • Epochs
    • Intervals
    • ClockSync
    • concat_intervals
    • sync_clocks
  • Segmented data
    • SegmentedEyeData
    • concat_segments
    • group_segments
    • SegmentedPupilNamespace
    • SegmentedGazeNamespace
  • Plotting (d.plot)
  • Reading and writing data
    • read_eyelink
    • read_file
    • write_file
    • download
    • fetch_url
    • local_copy
    • load_study_local
    • load_study_osf
    • get_osf_project_files
    • osf_authenticate
    • get_figshare_files
    • fetch_figshare_file
    • get_available_datasets
    • get_example_data
    • get_rlmw_002
    • get_rlmw_002_short
    • get_rlmw_010_edf
    • get_nback_001
  • Signal processing
    • butter_lowpass
    • butter_lowpass_filter
    • lowpass_filter_iterative
    • smooth_window
    • downsample
    • zscale
    • bspline
    • baseline_envelope
    • baseline_envelope_iter_bspline
    • baseline_pupil_model
    • velocity_savgol
    • detect_blinks_velocity
    • detect_blinks_zero
    • blink_onsets_mahot
    • pupil_kernel
    • pupil_kernel_t
    • pupil_get_max_duration
    • plot_prf
    • pupil_build_design_matrix
    • pupil_response
    • pupil_response_coverage
    • pupilresponse_nnls
    • pupil_signal_quality
    • pupil_eye_offset
    • fake_pupil_baseline
    • fake_gaze_fixations
    • add_measurement_noise
    • generate_foreshortening_data
  • Geometry and gaze
    • ExperimentalSetup
    • SpatialCalibration
    • ForeshorteningCalibration
    • ROI
    • CircularROI
    • RectangularROI
  • Units
    • Quantity
    • Unit
    • parse_time
    • parse_distance
    • parse_angle
  • Viewer, settings and logging
    • view
    • tweak
    • set_default_inplace
    • get_default_inplace
    • logging_set_level
    • logging_get_level
    • logging_disable
    • logging_enable
    • loglevel
    • nologging
    • initialize_logging
  • API reference
  • Reading and writing data
  • read_eyelink

read_eyelink#

pypillometry.read_eyelink(source, cache_file=None, force_download=False, session=None, cache_dir=None, autodelete=None, cache_layout='flat')[source]#

Read an Eyelink file/URL and return the object returned by the “eyelinkio” package.

Requires the optional package eyelinkio. Its console output is only shown when the log level is “DEBUG”. URLs are downloaded with fetch_url().

Parameters:
  • source (str) – filename of the Eyelink EDF file, HTTP(S) URL (OSF client URLs such as https://osf.io/<id> are converted to download URLs) or SSH URL (ssh://server/folder/file.edf)

  • cache_file (Optional[str]) – local filename to store a downloaded file in

  • cache_dir (Optional[str]) – directory to store a downloaded file in (as cache_dir/<file>, see cache_layout), used if cache_file is None. If both are None, a temporary directory is used.

  • force_download (bool) – if True, download again even if a local copy exists in cache_file/cache_dir

  • session (Optional[Session]) – requests session for HTTP(S) downloads (e.g., from osf_authenticate() for private projects)

  • autodelete (Optional[bool]) – if True, the downloaded copy is deleted after it was read (also in cache_file/cache_dir). If None (default), only a temporary download (no cache_file/cache_dir) is deleted. Local files are never deleted.

  • cache_layout (str) – "flat" (default) or "mirror" (cache_dir/<host>/<path>), see fetch_url()

Return type:

eyelinkio.EDF

Returns:

object returned by eyelinkio.read_edf()

See also

pypillometry.EyeData.from_eyelink

create an eyedata object from an EDF file

Notes

Reading EDF files is slow (about a minute for a 90 MB file, mostly in eyelinkio). Convert them once and work with the saved files, which are read in well under a second: with the command-line program edf2pypil or with write_file().

previous

Reading and writing data

next

read_file

On this page
  • read_eyelink()
Edit on GitHub
Show Source

© Copyright 2020-2026, Matthias Mittner.

Created using Sphinx 9.2.0.

Built with the PyData Sphinx Theme 0.24.0.