TSFitPy-developers / TSFitPy

Turbospectrum Spectral Fitting with Python (TSFitPy)
13 stars 4 forks source link

An enhancement for `run_wrapper.py` #21

Closed iScottMark closed 1 year ago

iScottMark commented 1 year ago

It's NOT an ask or request, just my notes when I read the souce codes.

The code is located here

Take the nlte_flag into account.

Original:

for element in model_atom_file:
    aux_file_length_dict[element] = len(np.loadtxt(os.path.join(departure_file_path, depart_aux_file[element]), dtype='str'))

Modified:

if nlte_flag:
    for element in model_atom_file:
        aux_file_length_dict[element] = len(np.loadtxt(os.path.join(departure_file_path, depart_aux_file[element]), dtype='str'))
stormnick commented 1 year ago

Hey, thanks for the comment. Good spot, I will change that. That should slightly improve the speed of the LTE synthetic spectra generation. I need to rewrite run_wrapper honestly, I just did this small change to make it "workable" because of other changes.

Also feel free to check the updated public Trello board with the TODO list: https://trello.com/b/2xe7T6qH/tsfitpy-todo . I mention some basic TODO improvements. I will try to slowly update the specifics there, when I get more time to work on the code.