demisjohn / ASML_JobCreator

Generate ASCII Job files for an ASML PAS 5500 Stepper Lithography system, by the UCSB Nanofabrication Facility.
16 stars 4 forks source link

Generalize the export_lib.py > add() function #40

Open demisjohn opened 2 years ago

demisjohn commented 2 years ago

Currently the add() function in export_lib.py, which formats values appropriately for the text export, has a hokey kludge of if/elif statements that are each specific to a particular text line.

eg. "WAFER_ALIGN_REPEATS" uses elif np.size(val) == 10:... or "OptPrealignment Marks " uses elif np.size(val)==2 ... AND if doubelstr==True

Instead should generalize for general code readability (eg. use on another system) using arguments to determine format, instead of size( ) of the list passed.

Arguments should only be things like "quoted", "string", "integer", "float" etc. Thus another developer could guess how it's going to get formatted from the arguments passed. Currently, instead a different format is applied depending on the np.size( ) of the vlaue list passed, which would require a dev to scour the add( ) function to figure out what it's actually going to do!

Here's a link to the add() function: https://github.com/demisjohn/ASML_JobCreator/blob/master/ASML_JobCreator/exportlib.py#L36

demisjohn commented 1 year ago

Should implement Tests before trying this, to make sure nothing breaks in the output text file.

See issue on adding tests here: https://github.com/demisjohn/ASML_JobCreator/issues/17