Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major revision to tree.py #322

Closed
stuartcampbell opened this issue May 6, 2014 · 7 comments
Closed

Major revision to tree.py #322

stuartcampbell opened this issue May 6, 2014 · 7 comments

Comments

@stuartcampbell
Copy link
Member

Original reporter: rayosborn

As I discussed on the NeXus mailing list a few weeks ago, there has been a major rewrite of the tree API that makes the API more robust and more convenient to use interactively. The major changes are:

  1. to give the NXfields (formerly SDSs) all the functionality of Numpy arrays

  2. to allow group items to be accessed through a dictionary interface

  3. to make the syntax cleaner by simplifying method names.

I will be uploading a new version shortly, which will not be backwardly compatible with the previous one. Please contact Ray Osborn ROsborn@anl.gov if you need assistance upgrading to the new version.

@stuartcampbell
Copy link
Member Author

Original reporter: rayosborn

In [1801]:

#CommitTicketReference repository="" revision="1801"
Refs #322: Major revision to the tree API to make it more robust and provide a cleaner syntax.

@stuartcampbell
Copy link
Member Author

Original reporter: pkienzle

In [1804]:

#CommitTicketReference repository="" revision="1804"
Refs #322: Allow root.save() to replace the underlying file; tree property now returns a string rather than printing; treestr changed to tree_with_attrs

@stuartcampbell
Copy link
Member Author

Original reporter: rayosborn

In [1805]:

#CommitTicketReference repository="" revision="1805"
Refs #322: Added arguments to use the standard matplotlib format strings to
set axis and intensity limits. Improved handling of log scales. Added oplot
and logplot methods.

@stuartcampbell
Copy link
Member Author

Original reporter: rayosborn

In [1806]:

#CommitTicketReference repository="" revision="1806"
Refs #322: Further improvements to make file saves work more intuitively.

- Added three NeXus object flags, 'infile', 'saved', and 'changed' to record whether
the NXobject currently exists in the file, whether its current value has been saved,
and whether it has been changed. The third flag is for third-party scripts that need
to keep track of when a variable has been changed. It can be reset using the 
'set_unchanged' method.

- Added write methods to the NXobjects to write the object directly to the NeXus file. 
This required moving the context routines (__enter__ and __exit__) to the NXobject 
class. The use of the 'with ... as ...' syntax means that the API now requires 
Python 2.5.

- Used the new 'walk' methods in conjunction with the 'write' methods to allow
incremental saves (when no file name is specified) without needing to reload the
entire file.

- Debugged the reading and writing of NXlink objects to NeXus files.

@stuartcampbell
Copy link
Member Author

Original reporter: rayosborn

In [1808]:

#CommitTicketReference repository="" revision="1808"
Refs #322: Further improvements to make file saves work more intuitively.

- Added a read method to both NXfields and NXgroups to allow data to be restored to
the previously saved values.

- Added setters for the nxsignal and nxaxes properties to allow them to be set 
after the NXdata group is created.

- Added a recursive option to 'set_unchanged'.

@stuartcampbell
Copy link
Member Author

Original reporter: rayosborn

In [1819]:

#CommitTicketReference repository="" revision="1819"
Refs #322: Mostly tidying things up.

- Updated exceptions to use preferred Python syntax and removed some redundant 
  TypeError traps.

- Replaced spaces in NXobject names by underscores.

- Removed check for the dimension products being negative due to overflows.

- In log plots, the minimum value of 0.1 is only used for integer data, where it
  is a reasonable replacement for values of 0. In floating point data, the default
  matplotlib behaviour is restored (but can be overridden by using the zmin keyword
  argument).

@eugenwintersberger
Copy link
Contributor

This issue has been moved to nexusformat/python-nxs#6. Please continue commenting there.

@nexusformat nexusformat locked and limited conversation to collaborators Dec 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants