Skip to content

Commit f08e2eb

Browse files
committed
Renamed package from 'scidata' to 'xray'
1 parent ad9a913 commit f08e2eb

19 files changed

+38
-36
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# scidata: objects for working with scientific data in Python
1+
# xray: transparently manipulate scientific datasets in Python
22

3-
**scidata** is a Python package for working with aligned sets of homogeneous,
3+
**xray** is a Python package for working with aligned sets of homogeneous,
44
n-dimensional arrays. It implements flexible array operations and dataset
55
manipulation for in-memory datasets within the [Common Data Model][cdm] widely
66
used for self-describing scientific data (netCDF, OpenDAP, etc.).
77

8+
***Warning: xray is still in its early development phase. Expect the API to
9+
change.***
10+
811
## Main Feaures
912

1013
- A `DatasetArray` object that is compatible with NumPy's ndarray and ufuncs
@@ -34,14 +37,14 @@ used for self-describing scientific data (netCDF, OpenDAP, etc.).
3437

3538
- [Iris][iris] (supported by the UK Met office) is a similar package
3639
designed for working with geophysical datasets in Python. Iris provided
37-
much of the inspiration for scidata (e.g., scidata's `DatasetArray` is
38-
largely based on the Iris `Cube`), but it has several limitations that led
39-
us to build scidata instead of extending Iris:
40+
much of the inspiration for xray (e.g., xray's `DatasetArray` is largely
41+
based on the Iris `Cube`), but it has several limitations that led us to
42+
build xray instead of extending Iris:
4043
1. Iris has essentially one first-class object (the `Cube`) on which it
4144
attempts to build all functionality (`Coord` supports a much more
42-
limited set of functionality). scidata has its equivalent of the Cube
45+
limited set of functionality). xray has its equivalent of the Cube
4346
(the `DatasetArray` object), but it is only a thin wrapper on the more
44-
primitive building blocks of Dataset and Variable objects.
47+
primitive building blocks of Dataset and Array objects.
4548
2. Iris has a strict interpretation of [CF conventions][cf], which,
4649
although a principled choice, we have found to be impractical for
4750
everyday uses. With Iris, every quantity has physical (SI) units, all
@@ -55,14 +58,14 @@ used for self-describing scientific data (netCDF, OpenDAP, etc.).
5558
models of how Iris functions work. Moreover, it means that a lot of
5659
logic (e.g., constraint handling) uses non-vectorized operations. For
5760
example, extracting all times within a range can be surprisingly slow
58-
(e.g., 0.3 seconds vs 3 milliseconds in scidata to select along a time
61+
(e.g., 0.3 seconds vs 3 milliseconds in xray to select along a time
5962
dimension with 10000 elements).
6063
- [pandas][pandas] is fast and powerful but oriented around working with
6164
tabular datasets. pandas has experimental N-dimensional panels, but they
6265
don't support aligned math with other objects. We believe the
6366
`DatasetArray`/ `Cube` model is better suited to working with scientific
64-
datasets. We use pandas internally in scidata to support fast indexing.
65-
- [netCDF4-python][nc4] provides scidata's primary interface for working with
67+
datasets. We use pandas internally in xray to support fast indexing.
68+
- [netCDF4-python][nc4] provides xray's primary interface for working with
6669
netCDF and OpenDAP datasets.
6770

6871
[pandas]: http://pandas.pydata.org/

doc/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# scidata documentation build configuration file, created by
3+
# xray documentation build configuration file, created by
44
# sphinx-quickstart on Thu Feb 6 18:57:54 2014.
55
#
66
# This file is execfile()d with the current directory set to its
@@ -53,7 +53,7 @@
5353
master_doc = 'index'
5454

5555
# General information about the project.
56-
project = u'scidata'
56+
project = u'xray'
5757
copyright = u'2014, Stephan Hoyer and Alex Kleeman'
5858

5959
# The version info for the project you're documenting, acts as replacement for
@@ -186,7 +186,7 @@
186186
#html_file_suffix = None
187187

188188
# Output file base name for HTML help builder.
189-
htmlhelp_basename = 'scidatadoc'
189+
htmlhelp_basename = 'xraydoc'
190190

191191

192192
# -- Options for LaTeX output ---------------------------------------------
@@ -206,7 +206,7 @@
206206
# (source start file, target name, title,
207207
# author, documentclass [howto, manual, or own class]).
208208
latex_documents = [
209-
('index', 'scidata.tex', u'scidata Documentation',
209+
('index', 'xray.tex', u'xray Documentation',
210210
u'Stephan Hoyer and Alex Kleeman', 'manual'),
211211
]
212212

@@ -236,7 +236,7 @@
236236
# One entry per manual page. List of tuples
237237
# (source start file, name, description, authors, manual section).
238238
man_pages = [
239-
('index', 'scidata', u'scidata Documentation',
239+
('index', 'xray', u'xray Documentation',
240240
[u'Stephan Hoyer and Alex Kleeman'], 1)
241241
]
242242

@@ -250,8 +250,8 @@
250250
# (source start file, target name, title, author,
251251
# dir menu entry, description, category)
252252
texinfo_documents = [
253-
('index', 'scidata', u'scidata Documentation',
254-
u'Stephan Hoyer and Alex Kleeman', 'scidata', 'One line description of project.',
253+
('index', 'xray', u'xray Documentation',
254+
u'Stephan Hoyer and Alex Kleeman', 'xray', 'One line description of project.',
255255
'Miscellaneous'),
256256
]
257257

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
SciData reference
7-
=================
6+
xray reference
7+
==============
88

99
Contents:
1010

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
except:
66
from distutils.core import setup
77

8-
setup(name='scidata',
8+
setup(name='xray',
99
version='0.1-dev',
1010
description='Objects for holding self describing scientific data in python',
1111
author='Stephan Hoyer, Alex Kleeman',
@@ -15,5 +15,5 @@
1515
tests_require=['nose >= 1.0'],
1616
url='https://github.com/akleeman/scidata',
1717
test_suite='nose.collector',
18-
packages=['scidata'],
18+
packages=['xray'],
1919
package_dir={'': 'src'})
File renamed without changes.

src/scidata/array_.py renamed to src/xray/array_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def __repr__(self):
224224
contents = ' (%s): %s' % (dim_summary, self.dtype)
225225
else:
226226
contents = ': %s' % self.data
227-
return '<scidata.%s%s>' % (type(self).__name__, contents)
227+
return '<xray.%s%s>' % (type(self).__name__, contents)
228228

229229
def indexed_by(self, **indexers):
230230
"""Return a new variable indexed along the specified dimension(s)
@@ -591,7 +591,7 @@ def _broadcast_variable_data(self, other):
591591
if isinstance(other, dataset.Dataset):
592592
raise TypeError('datasets do not support mathematical operations')
593593
elif all(hasattr(other, attr) for attr in ['dimensions', 'data', 'shape']):
594-
# `other` satisfies the scidata.Array API
594+
# `other` satisfies the xray.Array API
595595
new_self, new_other = broadcast_variables(self, other)
596596
self_data = new_self.data
597597
other_data = new_other.data
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/scidata/dataset.py renamed to src/xray/dataset.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def __repr__(self):
139139
(k, str(v).replace(
140140
'\n', '\n' + ' ' * (len(k) + 4)))
141141
for k, v in self.items())
142-
return ("<class 'scidata.data.%s' (dict-like)>\n%s"
142+
return ("<class 'xray.data.%s' (dict-like)>\n%s"
143143
% (type(self).__name__, contents))
144144

145145

@@ -432,9 +432,8 @@ def __str__(self):
432432
def __repr__(self):
433433
dim_summary = ', '.join('%s%s: %s' % ('@' if k in self else '', k, v)
434434
for k, v in self.dimensions.iteritems())
435-
return '<scidata.%s (%s): %s>' % (type(self).__name__,
436-
dim_summary,
437-
' '.join(self.noncoordinates))
435+
return '<xray.%s (%s): %s>' % (type(self).__name__, dim_summary,
436+
' '.join(self.noncoordinates))
438437

439438
def create_variable(self, name, dims, data, attributes=None):
440439
"""Create a new variable and add it to this dataset

src/scidata/dataset_array.py renamed to src/xray/dataset_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, dataset, focus):
4646
"""
4747
Parameters
4848
----------
49-
dataset : scidata.Dataset
49+
dataset : xray.Dataset
5050
The dataset on which to build this data view.
5151
focus : str
5252
The name of the "focus variable" in `dataset` on which this object
@@ -155,7 +155,7 @@ def __repr__(self):
155155
contents = ' (%s): %s' % (dim_summary, self.dtype)
156156
else:
157157
contents = ': %s' % self.data
158-
return '<scidata.%s %r%s>' % (type(self).__name__, self.focus, contents)
158+
return '<xray.%s %r%s>' % (type(self).__name__, self.focus, contents)
159159

160160
def indexed_by(self, **indexers):
161161
"""Return a new dataset array whose dataset is given by indexing along
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from numpy.testing import assert_array_equal
44

5-
from scidata import utils
5+
from xray import utils
66

77

88
class TestCase(unittest.TestCase):

test/test_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44

5-
from scidata import Array, Dataset
5+
from xray import Array, Dataset
66
from . import TestCase
77

88

@@ -41,7 +41,7 @@ def test_properties(self):
4141

4242
def test_repr(self):
4343
v = Array(['time', 'x'], self.d)
44-
self.assertEqual('<scidata.Array (time: 10, x: 3): float64>',
44+
self.assertEqual('<xray.Array (time: 10, x: 3): float64>',
4545
repr(v))
4646

4747
def test_items(self):

test/test_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import numpy as np
99
import pandas as pd
1010

11-
from scidata import Dataset, DatasetArray, Array, backends, open_dataset
11+
from xray import Dataset, DatasetArray, Array, backends, open_dataset
1212
from . import TestCase
1313

1414

@@ -42,7 +42,7 @@ def get_store(self):
4242

4343
def test_repr(self):
4444
data = create_test_data(self.get_store())
45-
self.assertEqual('<scidata.Dataset (time: 1000, @dim1: 100, '
45+
self.assertEqual('<xray.Dataset (time: 1000, @dim1: 100, '
4646
'@dim2: 50, @dim3: 10): var1 var2 var3>', repr(data))
4747

4848
def test_init(self):

test/test_dataset_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22

3-
from scidata import Dataset, DatasetArray, Array, intersection
3+
from xray import Dataset, DatasetArray, Array, intersection
44
from . import TestCase, ReturnItem
55

66

test/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33
import pandas as pd
44

5-
from scidata import utils
5+
from xray import utils
66
from . import TestCase, ReturnItem
77

88

0 commit comments

Comments
 (0)