|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Types | |
| enum | DATA_TYPE { Intensity , Coordinate } |
Public Member Functions | |
| CsvImportData (QObject *parent=nullptr) | |
| QList< QString > | availableCoordinateUnits () const |
| std::set< std::pair< int, int > > | checkData () |
| int | column (DATA_TYPE type) const |
| QString | columnLabel (DATA_TYPE type) const |
| const csv::DataArray & | data () const |
| size_t | firstRow () |
| size_t | lastRow () |
| csv::DataColumn | multipliedValues (DATA_TYPE type) const |
| double | multiplier (DATA_TYPE type) const |
| size_t | nCols () const |
| size_t | nRows () const |
| void | resetSelection () |
| bool | rowExcluded (int row) |
| std::set< int > | rowsToDiscard () const |
| int | setColumnAs (int col, csv::ColumnType type) |
| sets type to a column col. More... | |
| void | setData (csv::DataArray data) |
| void | setFirstRow (size_t row) |
| void | setLastRow (size_t row) |
| void | setMultiplier (DATA_TYPE type, double value) |
| void | toggleDiscardRows (std::set< int > rows) |
| csv::DataColumn | values (int col) const |
Static Public Member Functions | |
| static std::vector< DATA_TYPE > | availableTypes () |
Private Member Functions | |
| std::set< int > | checkFormat (const csv::DataColumn &values, bool check_ordering) |
| Checks if selected data is suitable for import. More... | |
Private Attributes | |
| std::unique_ptr< const csv::DataArray > | m_data |
| std::set< int > | m_discarded_rows |
| size_t | m_n_footer |
| number of footer rows More... | |
| size_t | m_n_header |
| number of header rows More... | |
| std::map< DATA_TYPE, CsvCoordinateColumn > | m_selected_cols |
Definition at line 22 of file CsvImportTable.h.
| CsvImportData::CsvImportData | ( | QObject * | parent = nullptr | ) |
Definition at line 30 of file CsvImportTable.cpp.
| QList< QString > CsvImportData::availableCoordinateUnits | ( | ) | const |
Definition at line 167 of file CsvImportTable.cpp.
References csv::_q_, csv::_theta_, axisUnitLabel, column(), Coordinate, and m_selected_cols.
Referenced by CsvImportTable::availableCoordinateUnits().
|
static |
Definition at line 103 of file CsvImportTable.cpp.
References Coordinate, and Intensity.
Referenced by checkData(), CsvImportTable::setHeaders(), CsvImportTable::setMultiplierFields(), and CsvImportTable::updateSelectedCols().
| std::set< std::pair< int, int > > CsvImportData::checkData | ( | ) |
Definition at line 201 of file CsvImportTable.cpp.
References availableTypes(), checkFormat(), column(), Coordinate, and multipliedValues().
Referenced by CsvImportTable::checkData().
|
private |
Checks if selected data is suitable for import.
All values must be convertible to doubles, positive and sorted in ascending order if check_ordering is set to true. Returns a set of rows where the check failed.
Definition at line 221 of file CsvImportTable.cpp.
References m_discarded_rows, m_n_footer, m_n_header, nRows(), and values().
Referenced by checkData().
| int CsvImportData::column | ( | DATA_TYPE | type | ) | const |
Definition at line 113 of file CsvImportTable.cpp.
References m_selected_cols.
Referenced by availableCoordinateUnits(), checkData(), CsvImportTable::coordinateColumn(), CsvImportTable::intensityColumn(), multipliedValues(), setColumnAs(), CsvImportTable::setHeaders(), CsvImportTable::setMultiplierFields(), and CsvImportTable::updateSelectedCols().
| QString CsvImportData::columnLabel | ( | CsvImportData::DATA_TYPE | type | ) | const |
Definition at line 160 of file CsvImportTable.cpp.
References csv::HeaderLabels, and m_selected_cols.
Referenced by CsvImportTable::setHeaders().
| const csv::DataArray & CsvImportData::data | ( | ) | const |
|
inline |
Definition at line 53 of file CsvImportTable.h.
References m_n_header.
Referenced by CsvImportTable::setFirstRow().
|
inline |
Definition at line 54 of file CsvImportTable.h.
References m_n_footer, and nRows().
Referenced by CsvImportTable::setLastRow().
| csv::DataColumn CsvImportData::multipliedValues | ( | DATA_TYPE | type | ) | const |
Definition at line 131 of file CsvImportTable.cpp.
References column(), multiplier(), nCols(), and values().
Referenced by checkData(), and CsvImportTable::updateSelectedCols().
| double CsvImportData::multiplier | ( | CsvImportData::DATA_TYPE | type | ) | const |
Definition at line 153 of file CsvImportTable.cpp.
References m_selected_cols.
Referenced by CsvImportTable::coordinateMultiplier(), CsvImportTable::intensityMultiplier(), multipliedValues(), and CsvImportTable::setMultiplierFields().
| size_t CsvImportData::nCols | ( | ) | const |
Definition at line 180 of file CsvImportTable.cpp.
References m_data, and nRows().
Referenced by multipliedValues(), CsvImportTable::setMultiplierFields(), and values().
| size_t CsvImportData::nRows | ( | ) | const |
Definition at line 187 of file CsvImportTable.cpp.
Referenced by checkFormat(), lastRow(), nCols(), rowExcluded(), setFirstRow(), and setLastRow().
| void CsvImportData::resetSelection | ( | ) |
Definition at line 213 of file CsvImportTable.cpp.
References m_discarded_rows, m_n_footer, m_n_header, and m_selected_cols.
Referenced by CsvImportTable::resetSelection().
| bool CsvImportData::rowExcluded | ( | int | row | ) |
Definition at line 192 of file CsvImportTable.cpp.
References m_discarded_rows, m_n_footer, m_n_header, and nRows().
Referenced by CsvImportTable::greyoutDiscardedRows().
|
inline |
Definition at line 49 of file CsvImportTable.h.
References m_discarded_rows.
Referenced by CsvImportTable::rowsToDiscard().
| int CsvImportData::setColumnAs | ( | int | col, |
| csv::ColumnType | type | ||
| ) |
sets type to a column col.
Returns the column number previously set to the type
Definition at line 44 of file CsvImportTable.cpp.
References csv::_intensity_, column(), Coordinate, Intensity, m_selected_cols, and values().
Referenced by CsvImportTable::setColumnAs().
| void CsvImportData::setData | ( | csv::DataArray | data | ) |
Definition at line 35 of file CsvImportTable.cpp.
References data(), m_data, m_discarded_rows, m_n_footer, m_n_header, and m_selected_cols.
Referenced by CsvImportTable::setData().
| void CsvImportData::setFirstRow | ( | size_t | row | ) |
Definition at line 74 of file CsvImportTable.cpp.
References m_n_header, and nRows().
Referenced by CsvImportTable::setFirstRow().
| void CsvImportData::setLastRow | ( | size_t | row | ) |
Definition at line 81 of file CsvImportTable.cpp.
References m_n_footer, and nRows().
Referenced by CsvImportTable::setLastRow().
| void CsvImportData::setMultiplier | ( | CsvImportData::DATA_TYPE | type, |
| double | value | ||
| ) |
Definition at line 66 of file CsvImportTable.cpp.
References m_selected_cols.
Referenced by CsvImportTable::setMultiplierFields().
| void CsvImportData::toggleDiscardRows | ( | std::set< int > | rows | ) |
Definition at line 88 of file CsvImportTable.cpp.
References m_discarded_rows.
Referenced by CsvImportTable::discardRows().
| csv::DataColumn CsvImportData::values | ( | int | col | ) | const |
Definition at line 119 of file CsvImportTable.cpp.
References m_data, and nCols().
Referenced by checkFormat(), multipliedValues(), CsvImportTable::resetColumn(), and setColumnAs().
|
private |
|
private |
Definition at line 70 of file CsvImportTable.h.
Referenced by checkFormat(), resetSelection(), rowExcluded(), rowsToDiscard(), setData(), and toggleDiscardRows().
|
private |
number of footer rows
Definition at line 69 of file CsvImportTable.h.
Referenced by checkFormat(), lastRow(), resetSelection(), rowExcluded(), setData(), and setLastRow().
|
private |
number of header rows
Definition at line 68 of file CsvImportTable.h.
Referenced by checkFormat(), firstRow(), resetSelection(), rowExcluded(), setData(), and setFirstRow().
|
private |
Definition at line 67 of file CsvImportTable.h.
Referenced by availableCoordinateUnits(), column(), columnLabel(), multiplier(), resetSelection(), setColumnAs(), setData(), and setMultiplier().