You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method should use bigEndian, perhaps also the property float!
This returns a very high value for a linear FITS image:
public func normalize(_ bzero: Float = 0, _ bscale: Float = 1, _ min: FITSByte_16 = .min, _ max: FITSByte_16 = .max) -> Float {
return (bzero + Float(self) * bscale) / Self.range
}
This would return the correct value:
public func normalize(_ bzero: Float = 0, _ bscale: Float = 1, _ min: FITSByte_16 = .min, _ max: FITSByte_16 = .max) -> Float {
return (bzero + Float(self.bigEndian) * bscale) / Self.range
}
The text was updated successfully, but these errors were encountered:
The method should use bigEndian, perhaps also the property float!
This returns a very high value for a linear FITS image:
public func normalize(_ bzero: Float = 0, _ bscale: Float = 1, _ min: FITSByte_16 = .min, _ max: FITSByte_16 = .max) -> Float {
return (bzero + Float(self) * bscale) / Self.range
}
This would return the correct value:
public func normalize(_ bzero: Float = 0, _ bscale: Float = 1, _ min: FITSByte_16 = .min, _ max: FITSByte_16 = .max) -> Float {
return (bzero + Float(self.bigEndian) * bscale) / Self.range
}
The text was updated successfully, but these errors were encountered: