Stoner Pacakge API Documentation

  • ← Data.scale
  • Data.search_index →
  • Stoner Package
  • Stoner Package
  • Stoner.Data

Data.search¶

Data.search(xcol=None, value=None, columns=None, accuracy=0.0)¶

Search the numerica data part of the file for lines that match and returns the corresponding rows.

Parameters:

datafile (Data) – Data object to work with if not being used as a bound method.

Keyword Arguments:
  • xcol (index types, None) – a Search Column Index. If None (default), use the current setas.x

  • value (float, tuple, list or callable, None) – Value to look for

  • columns (index or array of indices or None (default)) – columns of data to return - none represents all columns.

  • accuracy (float) – Uncertainty to accept when testing equalities

Returns:

ndarray – numpy array of matching rows or column values depending on the arguments.

Note

The value is interpreted as follows:

  • a float looks for an exact match

  • a list is a list of exact matches

  • an array or list of booleans (index like Numpy does)

  • a tuple should contain a (min,max) value.

  • A callable object should have accept a float and an array representing the value of the search col for the the current row and the entire row.

  • None opens an interactive span selector in a plot window.

Logo of Stoner Package

Table of Contents

  • Data.search
    • Data.search()

Previous topic

Data.scale

Next topic

Data.search_index

This Page

  • Show Source
  • ← Data.scale
  • Data.search_index →
  • Stoner Package
  • Stoner Package
  • Stoner.Data
© 2013-15, Gavin Burnell et al.Last updated on Dec 21, 2025. Created using Sphinx 8.2.3 with the better theme.