[ase-users] [EXTERNAL] Re: Multipurpose variable needed for atoms

Michael Walter Michael.Walter at fmf.uni-freiburg.de
Fri May 17 08:56:51 CEST 2019


Dear Eric,

Am Do., 16. Mai 2019 um 17:22 Uhr schrieb Hermes, Eric <ehermes at sandia.gov>:

> (apologies for the <snipped> context, Outlook makes replying inline
> unnecessarily difficult)
>
> >I guess for colouring this is true as you need something which is far
> >away from the 'legit' values.  So that speaks for something like NaN.
> >In most other cases the zeros might be okay - at least atoms objects
> >already can have 'unphysical' zeros for numbers and cell, which carry
> >special meaning.
>
> This sounds like an appropriate use case for numpy's maskedarray type (
> https://docs.scipy.org/doc/numpy/reference/maskedarray.html ).
> It looks and feels like a standard numpy array, but also indicates when
> certain values are missing or invalid. You need to specifically check the
> mask to know if data are missing/invalid, though.
> You can specify a 'fill' value for missing/invalid entries depending on
> what is reasonable for the attribute in question.
>

thanks for the hint and I agree that the maskedarray should apply here.

Nevertheless, I found it much easier to work with numpy.nan entries. Anyway
both work now.

Best,
Michael



>
> Eric
>
>

-- 
------------------------------------------
PD Dr Michael Walter
Addresses:
- Fraunhofer IWM, Wöhlerstrasse 11, D-79108 Freiburg i. Br., Germany
  Tel.: +49 761 5142 296
- FIT Freiburg Centre for Interactive Materials and Bioinspired
Technologies, Georges-Köhler-Allee 105, 79110 Freiburg, Germany
  Tel: +49 761 203 95072
email: Michael.Walter at fmf.uni-freiburg.de
www: http://www.functional-nanosystems.uni-freiburg.de/People/PDWalter/group
publications: http://scholar.google.com/citations?user=vlmryKEAAAAJ&hl=en
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20190517/ac8ad135/attachment-0001.html>


More information about the ase-users mailing list