You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The atomic data base generated from the quickstart notebook (i.e. the TARDIS quickstart database kurucz_cd23_chianti_H_He) contains duplicate lines_data/ lines entries. This can lead to issues, e.g., when reindexing the database (see TARDIS #2442).
To Reproduce
importpandasaspdfromtardis.io.atom_data.utilimportdownload_atom_datadownload_atom_data('kurucz_cd23_chianti_H_He')
store=pd.HDFStore('/path/to/kurucz_cd23_chianti_H_He.h5')
defcheck_duplicates(df, verbose=False):
dup_idx=df.index[df.index.duplicated()]
not_identical=0foridxindup_idx:
data=df.loc[idx]
assertlen(data) >1, "Ups"identical=Trueforiinrange(len(data) -1):
# Line ID will obviously be differentdata_a=data.iloc[i].drop(labels="line_id")
data_b=data.iloc[i+1].drop(labels="line_id")
identical=data_a.equals(data_b)
ifnotidentical:
ifverbose:
print(data.loc[idx])
not_identical+=1ifnot_identical>0:
raiseValueError("Not all data is identical! (%d not identical)"%not_identical)
check_duplicates(store["lines"])
Screenshots
System
OS:
GNU/Linux
macOS
Environment (conda list):
(Default carsus env)
Additional context
The text was updated successfully, but these errors were encountered:
I'm not sure why this code raises a ValueError when the data are not identical, when I assume it should be looking the count of duplicates. I tried this with a newly-generated output from Carsus and there don't seem to be duplicates (hard to say) so regenerating the basic TARDIS atom data seems like a good idea.
Describe the bug
The atomic data base generated from the quickstart notebook (i.e. the TARDIS quickstart database
kurucz_cd23_chianti_H_He
) contains duplicatelines_data
/lines
entries. This can lead to issues, e.g., when reindexing the database (see TARDIS #2442).To Reproduce
Screenshots
System
OS:
Environment (
conda list
):(Default carsus env)
Additional context
The text was updated successfully, but these errors were encountered: