Feature #2193

Import order and priority

Added by dmitry about 1 year ago. Updated 12 months ago.

Status:ResolvedStart date:10 Oct 2018
Priority:NormalDue date:
Assignee:juan% Done:

100%

Category:-
Target version:Sprint 39

Description

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
application crash.

ImportViewNow1.png - Current state - known formats (62.5 KB) dmitry, 10 Oct 2018 08:54

ImportViewNow2.png - Current state - everything else (76.4 KB) dmitry, 10 Oct 2018 08:54

ImportViewToDo1.png - To implement - known formats (47.1 KB) dmitry, 10 Oct 2018 08:54

ImportViewToDo2.png - To implement - everything else (59.2 KB) dmitry, 10 Oct 2018 08:54


Related issues

Related to BornAgain - Envelope task #2192: 1D data import functionality Archived 10 Oct 2018

History

#1 Updated by dmitry about 1 year ago

#2 Updated by juan about 1 year ago

  • Assignee set to juan

#3 Updated by juan about 1 year ago

  • Assignee deleted (juan)

#4 Updated by dmitry 12 months ago

  • Status changed from Sprint to Resolved
  • Assignee set to juan
  • % Done changed from 0 to 100

Also available in: Atom PDF