Code Monkey home page Code Monkey logo

lauenn's People

Contributors

bm32esrf avatar jsmicha avatar ravipurohit1991 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lauenn's Issues

Extinction conditions

I believe that exctinction conditions not predefined in CrystalParameters.py are not dealt with correctly. Note that I added my own material with space group 191 (its PrNi5 for full reference) and crashed at generating trainig data via GUI.

Since group 191 has not predefined data, in CrystalParameters.py -> ApplyExtinctionrules (line 62 onwards) it satisfies Extinc.isdecimal() and so calls wyckpos_lauetools.py -> testhklcond_generalrules_array (line 428 onwards).

1st issue is that there gp[2] (defined by sorting appropriate wp entry at around 448) is None. But in the condition at 452 it is not 'n/a', so the cond gives true. But None does not seem to be valid argument for hklcond_group.findall (reported as #2).

Assuming there should have been and instead of or the return True statement seems weird, as the expected output of the function is smth like 2dim array. I tried to bypass this by outputting np.array(((True,),)), but it than crashes at utils_lauenn.py -> get_material_data -> dstar_square_2 = np.diag(np.inner(np.inner(H2, metrics), H2)) (line 912), since H2 is only 1x1 array (which I believe is connected to the fact that ApplyExtinctionrules got only one True instead of expected hkl triplet as described in this paragraph).

Hope I did not misinterpreted the code completely, I am mostly guessing. But all in all a material with space group 191 is not processed correctly and I tried to suggest the reason why it might be so.

Incorrect condition

In lauetoolsnn/lauetools/wyckpos_lauetools.py on lines 451 to 455 there is

# load reflection conditions if needed
if gp[2] is not None or gp[2] != 'n/a':
    hklcond = hklcond_group.findall(gp[2])
else:
    return True

IIUIC if gp[2]==None then it is not 'n/a' thus the whole condition is true and the code crashes as None seems to be not valid input for hklcond_group.findall

Similar case is at lines 96 to 100.

Note: I found that when trying to implement my own material into lauetoolsnn.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.