Commit b31a209b authored by Roberto Susino's avatar Roberto Susino
Browse files

Version 3.0

parent 7c9da240
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
# CHANGELOG
All changes to the Metis L1 pipeline are documented in this file.

## 3.0 - 2021-07-19
- Add the WCS (World Coordinate System) keywords to the FITS header and a set of routines to perform calculation of the instrument boresight parameters and S/C coordinates.
- Modify the pipeline to handle the new input I/F which includes the full set of Solar Orbiter SPICE kernels and the Metis Calibration Package.
- Add the derivation of the quality matrix which is now added in an extension to the L1 FITS file.
- Add several code optimisations.

## 2.3.1 - 2021-04-19
- Fixed a bug that caused an incorrect FITS file format: images with unsigned or long integer data type were saved as signed integers with the wrong BSCALE and BZERO scale keywords.
- Fix a bug that caused an incorrect FITS file format: images with unsigned or long integer data type were saved as signed integers with the wrong BSCALE and BZERO scale keywords.

## 2.3 - 2021-03-10
- Fix a bug that caused incorrect pixel counts in re-binned images. Pixel counts are now correctly multiplied by the square of the binning factor after re-binning.
@@ -41,7 +47,7 @@ All changes to the Metis L1 pipeline are documented in this file.
- Revise the structure of the binary table containing the house-keeping parameters to make it more user-friendly.

## 1.0 – 2020-03-06
- Add several optimisations to the code.
- Add several code optimisations.
- Add the decode_obt.pro routine.

## 0.0 – 2020-01-16

check_quality.pro

0 → 100644
+27 −0
Original line number Diff line number Diff line
function check_quality, data, cal_pack, filter = filter

	if filter.contains('VL', /fold) then $
		channel = cal_pack.vl_channel else $
		channel = cal_pack.uv_channel

	levels = channel.sat_level.value

	quality_matrix = float(data) * 0.

	s1 = where(data le levels[0], count)
	if count gt 0 then quality_matrix[s1] = !values.f_nan

	s2 = where(data gt levels[0] and data le levels[1], count)
	if count gt 0 then quality_matrix[s2] = 0

	s3 = where(data gt levels[1] and data lt levels[2], count)
	if count gt 0 then quality_matrix[s3] = 1

	s4 = where(data ge levels[2] and data lt levels[3], count)
	if count gt 0 then quality_matrix[s4] = 0

	s5 = where(data ge levels[3], count)
	if count gt 0 then quality_matrix[s5] = !values.f_nan

	return, quality_matrix
end
+3 −3
Original line number Diff line number Diff line
function decode_obt, t_coarse, t_fine, to_double = to_double, from_double = from_double
	if keyword_set(to_double) then return, double(t_coarse) + double(t_fine)/65536.0D
	if keyword_set(from_double) then obt = [ulong(t_coarse), uint((t_coarse - ulong(t_coarse)) * 65536)] else obt = [t_coarse, t_fine]
function decode_obt, t_coarse, t_fine, to_decimal = to_decimal, from_decimal = from_decimal
	if keyword_set(to_decimal) then return, double(t_coarse) + double(t_fine)/65536.D0
	if keyword_set(from_decimal) then obt = [ulong(t_coarse), uint((t_coarse - ulong(t_coarse)) * 65536)] else obt = [t_coarse, t_fine]
	return, (obt.tostring()).join(':')
end

fits_hdr2struct.pro

0 → 100644
+15 −0
Original line number Diff line number Diff line
function fits_hdr2struct, string_hdr

	struct = !null
	n = n_elements(string_hdr)
	for i = 0, n - 1 do begin
		tag = string_hdr[i].substring(0, 7)
		tag = tag.trim()
		if tag eq '' then continue
		if tag.startswith('end', /fold) or tag.contains('continue', /fold) then continue
		if isa(struct) then if where(tag_names(struct) eq tag) ge 0 then continue
		struct = create_struct(struct, tag.replace('-', ' '), fxpar(string_hdr, tag))
	endfor

	return, struct
end

get_light_time.pro

0 → 100644
+16 −0
Original line number Diff line number Diff line
function get_light_time, utc, body, target, radvel = radvel

	; convert the requested date into ephemeris time

	cspice_str2et, utc, et

	; coordinates of the body wrt the target in the j2000 system

	cspice_spkezr, body, et, 'J2000', 'NONE', target, state, ltime

	; radial component of the velocity

	radvel = 1000.d0 * total(state[0 : 2] * state[3 : 5])/sqrt(total(state[0 : 2]^2))

	return, ltime
end
Loading