FITSFilter

Manages the import/export of data from/to a FITS file.

Public Methods

void

FITSFilter()

void

addKeywordUnit(const QString &fileName, const QList< Keyword > &keywords)

void

addNewKeyword(const QString &filename, const QList< Keyword > &keywords)

QList< Keyword >

chduKeywords(const QString &fileName)

const QString

currentExtensionName() const

void

deleteKeyword(const QString &fileName, const QList< Keyword > &keywords)

int

endColumn() const

int

endRow() const

QString

fileInfoString(const QString &)

bool

load(XmlStreamReader *) override

QStringList

mandatoryImageExtensionKeywords()

QStringList

mandatoryTableExtensionKeywords()

void

parseExtensions(const QString &fileName, QTreeWidget *tw, bool checkPrimary=false)

void

parseHeader(const QString &fileName, QTableWidget *headerEditTable, bool readKeys=true, const QList< Keyword > &keys=QList< Keyword >())

QVector< QStringList >

readChdu(const QString &fileName, bool *okToMatrix=nullptr, int lines=-1)

void

readDataFromFile(const QString &fileName, AbstractDataSource *=nullptr, ImportMode=ImportMode::Replace) override

void

removeExtensions(const QStringList &extensions)

void

save(QXmlStreamWriter *) const override

void

setCommentsAsUnits(const bool)

void

setCurrentExtensionName(const QString &)

void

setEndColumn(const int)

void

setEndRow(const int)

void

setExportTo(const int)

void

setStartColumn(const int)

void

setStartRow(const int)

QStringList

standardKeywords()

int

startColumn() const

int

startRow() const

QStringList

units()

void

updateKeywords(const QString &fileName, const QList< Keyword > &originals, const QVector< Keyword > &updates)

void

write(const QString &fileName, AbstractDataSource *) override

Detailed Description

class FITSFilter : public AbstractFileFilter

Manages the import/export of data from/to a FITS file.

Since

2.2.0

Public Functions

virtual void write(const QString &fileName, AbstractDataSource*) override

write

Writing the content of the datasource to the file with filename fileName

Parameters:

fileName –

virtual void save(QXmlStreamWriter*) const override

Saves as XML.

virtual bool load(XmlStreamReader*) override

Loads from XML.

void setStartRow(const int)

Sets the startRow to row.

Parameters:

row – the row to be set

int startRow() const

Returns startRow.

Returns:

The startRow

void setEndRow(const int)

Sets the endRow to row.

Parameters:

row – the row to be set

int endRow() const

Returns endRow.

Returns:

The endRow

void setStartColumn(const int)

Sets the startColumn to column.

Parameters:

column – the column to be set

int startColumn() const

Returns startColumn.

Returns:

The startColumn

void setEndColumn(const int)

Sets the endColumn to column.

Parameters:

column – the column to be set

int endColumn() const

Returns endColumn.

Returns:

The endColumn

void setCommentsAsUnits(const bool)

Sets commentsAsUnits to commentsAsUnits.

This is used when spreadsheets are exported to FITS table extensions and comments are used as the units of the table’s columns.

Parameters:

commentsAsUnits –

void setExportTo(const int)

Sets exportTo to exportTo.

This is used to decide whether the container should be exported to a FITS image or a FITS table For an image exportTo should be 0, for a table 1

Parameters:

exportTo –

Public Static Functions

static QStringList standardKeywords()

contains the {StandardKeywords \ MandatoryKeywords} keywords

Returns:

A list of keywords

static QStringList mandatoryImageExtensionKeywords()

Returns a list of keywords, that are mandatory for an image extension of a FITS file see: https://archive.stsci.edu/fits/fits_standard/node64.html.

Returns:

A list of keywords

static QStringList mandatoryTableExtensionKeywords()

Returns a list of keywords, that are mandatory for a table extension (ascii or bintable) of a FITS file see: https://archive.stsci.edu/fits/fits_standard/node58.html https://archive.stsci.edu/fits/fits_standard/node68.html.

Returns:

A list of keywords

static QStringList units()

Returns a list of strings that represent units which are used for autocompletion when adding keyword units to keywords.

Returns:

A list of strings that represent units

struct Keyword
struct KeywordUpdate