Import order and priority
|Status:||Resolved||Start date:||10 Oct 2018|
|Target version:||Sprint 39|
Currently import data assistant is unconditionally opened on import 1d data action,
neglecting BornAgain ability to read known formats.
Seems that these formats (e.g. .int) should be loaded without opening import assistant.
However, it does not work for numpy arrays and archives.
In the case of numpy, format is so simple, that a usual ASCII column-wise
file can be mistaken for numpy data. For now it is suggested to treat
them as usual ASCII files with opening the import assistant.
Archives can contain any data inside,
thus they become hard to handle. Their treatment should be considered in a separate
issue. Moreover, it is quite improbable, that user will provide archived data, with taking
into account, that reflectometry measurements are quite light-weight.
The only exception are .int.gz archives, which are created by BornAgain itself.
They should be treated by extension and imported without opening the assistant.
Another problem is that ASCII-files can have any extension, not only .txt or .csv.
Let's assume, that any file with unknown extension should be opened through
the import assistant. If it is a binary, assistant should show at least something
without crash (as it does now already).
To let the user know, what input formats are accepted, they should be clearly specified
in the import view (see attached screenshots).
So, the desired behavior is as follows:
1. Loading known formats: only .int, .int.gz, .txt, .csv should be shown,
everything else is hidden. After the extension of the file opened was determined,
dedicated loader is called or, if .txt or .csv file encountered, import assistant
should be called.
2. Loading ASCII file with arbitrary extension: all files are shown, import assistant
is opened after file was selected. Binary file selection should not lead to