pysep.misc.validate package

Submodules

pysep.misc.validate.pGridValidate module

class pysep.misc.validate.pGridValidate.pGridValidator(psm, gridKind='mass', checkKind='dis')

Bases: object

Simple auto grid validator. The goal of this is to add a one liner that can be called which will catch a bunch of basic, typo style mistakes, that can lead to a lot of wasted time running broken models. For example starting a grid of models over a range of masses but forgetting to update the masses of each model. Eventually this could take on more complex validation duties, though a lot of those are handeled by the preprocssing parts of pysep. For now this will preform a set of tests on some set of elements from mass, X, Y, Z, and mixing length to check if they actually vary from model to model. If they don’t vary then an exception will be thrown.

psm

Grid of models to be investigated. Technically this could just be a list; however, this is intended to be a grid of models built from pStellarModels. In the future this may transition to a managed DB.

Type

pStellarModel

gridKind

kind of grid you are generating. This is equivilent to the parameters of the models which will be checked for Dissimilarity. By default this will only check the mass. If you set this to all it will check mass, x, y, z, and alpha. You can also select any subset within that (though if you set it to all you can only set it to all). This string is the name of the parameter (lower case) seperated by a comma WITH NO WHITESPACE BETWEEN COMMA AND NEXT NAME.

Type

str, default=’mass’

checkKind

kinds of checks to run. Right now the only check is the dissimilarity check; therefore, do not adjust this value as no other value than the default will do anything currently.

Type

str, default=’dis’

GRIDKINDS = ['all', 'mass', 'x', 'y', 'z', 'alpha']
PARAMLOOKUP = {'alpha': <function pGridValidator.<lambda>>, 'mass': <function pGridValidator.<lambda>>, 'x': <function pGridValidator.<lambda>>, 'y': <function pGridValidator.<lambda>>, 'z': <function pGridValidator.<lambda>>}
dissimilarity_test()
grid_dissimilarity()
run_tests(checkKind)

Module contents