def generic(**contents): def is_null(entry): try: if np.isnan(entry): return True except TypeError: pass finally: return not bool(entry) sample = Sample(**contents) if is_null(sample.contents["Parent Sample Name"]): sample.contents["Parent Sample Name"] = str() return sample
def mechanical(**contents): return Sample(**contents)
def porosity(**contents): return Sample(**contents)
def build(**contents): return Sample(**contents)
def generic(**contents): return Sample(**contents)
def build(**attributes): return Sample(**attributes)
def xct(**attributes): return Sample(**attributes)
def vickers(**attributes): return Sample(**attributes)