handle case of orion datasets without star particles.

#99 Merged at 23aaaf5
Repository
yt-fixes
Branch
yt
Repository
yt
Branch
yt
Author
  1. J. S. Oishi
Reviewers
Description

Fixed a bug introduced with the addition of Orion star particle support: if your orion dataset has no star particles, this just warns you about it and happily continues on.

update: isolated reading of orion particles into a method. this is the result of a ridiculous transpose made due to my inability to use hg, so it's possible some changeset revisions changed numbers. not clear if this is a bad thing or not...

update 2: fixed a bug Andrew Myers pointed out.

Comments (5)

  1. MattT

    Hi Jeff. This looks okay, but I would request that instead of wrapping inside a try/except block, the entire star particle reader be put into a subroutine, since it doesn't seem to affect the state of the rest of the routine. Then it could return none if not os.exists(...).

    1. J. S. Oishi author

      This does indeed take into account 63be95c6afcc, but I had to do a transplant, and it renumbered it. I hope this all works ok, but I fear it will not.

      1. Andrew Myers

        I think that _readOrionParticleFile needs to return "True" or 1 or something, but other than that, this looks good to me. Thanks for the fix!