ukaea/neutronics_material_maker

xsdir and ZAID identifiers

CoronelBuendia opened this issue · 2 comments

nmm.find_prefered_library and nmm.find_prefered_library_file are defaulting to '', which, while silent and convenient, does not tell you about an issue until runtime.

I will replace this with a warning: Isotope XS not found in library.

Also, funnily enough, I tripped up on a obscure little problem with ZAIDs and low Z number Isotopes. Basically e.g. Boron (A=10, Z=5)'s self.zaid reads '510' in nmm, whereas in library it is '5010' because some weird rule in nuclear libraries, that I do not understand, nor wish to.

I will be fixing the above in the develop branch

OK, so it turns out you had already come across this Jon, and that for the example above, zaid was being written as '5010'.

However, using the pandas DataFrame messed this up because it casts everything as a float, meaning that zaid was being given '10.' instead of '10'. This is fixed by type-casting Z and A as ints.

Fixed in latest develop push

Great , thanks for fixing the DataFrame

The reason for find_prefered_library defaulting to ' ' is that people might want to make a material card without actually having an xsdir file locally on their computer. Adding a warning is a good idea.

Can I merge the develop branch with master