Documentation

Fits
in package

Table of Contents

Properties

$fitsHeader  : FitsHeader
$headerBlock  : string
$imageBlob  : string
$size  : int
$vipsImage  : Image
$contents  : string
$path  : string

Methods

__construct()  : mixed
Construct a Fits object
save()  : void
saveToJPG()  : void
saveToPNG()  : void
saveToTIFF()  : void
validate()  : bool
Validate the given FITS file based on block sizes
extractHeader()  : string
Extract the FITS header block as a string
extractImageBlob()  : string
Extract the FITS image blob as a string; it uses the NAXIS1 and NAXIS2 keywords to compute the length of the main data table

Properties

$headerBlock read-only

public string $headerBlock

$imageBlob read-only

public string $imageBlob

$size read-only

public int $size

$vipsImage read-only

public Image $vipsImage

$contents

private string $contents

$path

private string $path

Methods

__construct()

Construct a Fits object

public __construct(string $path) : mixed
Parameters
$path : string

The full path to the FITS file

Tags
throws
InvalidFits

InvalidPath

todo

Check path for reading/writing errors

save()

public save([string|null $path = null ]) : void
Parameters
$path : string|null = null

saveToJPG()

public saveToJPG(string $path) : void
Parameters
$path : string
Tags
todo

Write exception and check extension

saveToPNG()

public saveToPNG(string $path[, int $compressionLevel = 9 ]) : void
Parameters
$path : string
$compressionLevel : int = 9
Tags
todo

Write exception and check extension; PNG compression?

saveToTIFF()

public saveToTIFF(string $path) : void
Parameters
$path : string
Tags
todo

Write exception and check extension

validate()

Validate the given FITS file based on block sizes

public validate() : bool

From the FITS standard spec:

"Each FITS structure shall consist of an integral number of FITS blocks, which are each 2880 bytes (23040 bits) in length." (Definition of the Flexible Image Transport System (FITS), ch. 3, par. 3.1)

Return values
bool

extractHeader()

Extract the FITS header block as a string

private extractHeader() : string
Return values
string

extractImageBlob()

Extract the FITS image blob as a string; it uses the NAXIS1 and NAXIS2 keywords to compute the length of the main data table

private extractImageBlob() : string
Return values
string

        
On this page

Search results