OzPoz 'to do' list
------------------

This list was started in the run-up to PAA.

Completed tasks diary
---------------------

Need to accept a position angle in the .fld file.  DONE.

Need to write out ARGUS position angle - and SCALE (whatever that is)
in the PAF file.  DONE.

Need to accept a position angle and other ARGUS info in a PAF file. DONE.

Unspecified magnitude in .fld file defaults to previous star's value. Fix.
DONE. (Now reports an error if fields are missing).

Bulid under HP-UX (DONE).

Fix the warning message - 
config.c: In function `ConfigErrRep':
config.c:4109: warning: passing arg 3 of `ErsRep' discards qualifiers from point
er target type
Fix the warning message.  DONE.

Make sure it works from a directory other than the default.  DONE.

Only write unallocated targets to PAF file in expert mode. DONE.

Modify the number of fibres to leave for sky based on #available. DONE (Well,
set to zero for FLAMES, which isn't quite ideal, but this is tricky.)

Sort out the Makefiles. DONE.

Allow for offset between internal ARGUS angle and that presented to the
user. DONE. (Set to 90 degrees at the moment).

Work out guide star positions on the basis of their V-R colour, not the
observing wavelength. DONE - at least, we now use a fixed guide wavelength,
which PG says is good enough.

Combine fibre info from both plates. DONE.

Implement different UVES fibre types. DONE.

Allow '#' as well as '*' as comment character in .fld file.  DONE.

Check on use of uttime correction for VLT. DONE.

Proper time stamp for instrument status file. DONE.

Parse comment field in input file to allow V-I etc, and put into the PAF 
file. DONE.

Add the three extra modes Luca wanted - COMEDSIM, COIFUSIM, and COARGSIM. DONE.

Internals manual. DONE to PAA standard, could always be improved by more detail.

Should a wavelength setting or an HA check be part of the handheld process?
DONE, in the sense that we've agreed not to do it. Will be covered by enforcing
more stringent limits so all configurations will remain valid through HA and
wavelength changes.

(This was the state of play prior to PAA(A)).

30th Oct 2001.

Magnitude filter should leave sky targets alone. DONE.

Medusa targets should be called 'M' not 'P'. (But allow 'P' as well for the
moment.) DONE.

'Enter fibre number' option in show fibre dialogue is confusing. Remove it
and the associated 'apply' button.  DONE.

The type of object to which a fibre is allocated should be shown in the
'show fibre' dialogue. DONE.

31st Oct 2001.

PAF files recorded without a VLT guide star can't be re-read by FPOSS. DONE.

ARGUS targets 'A' are treated as objects by the PAF input code, not as 
sky.  DONE.

Changing from ARGUS to ARGUS configuration bypasses the allocation check. DONE.

1st Nov 2001.

Should check magnitude limits for VLT guide stars and display a warning in 
the object data dialogue if needed. DONE.
(Still need to know the proper limits to use.)

VLT guide stars outside the limit circle should be disallowed. DONE.
(Size of VLT guide star limit circle is now controlled by one line of code,
so can be changed easily as soon as we know what it should be.)

5th Nov 2001.

Intercept 'close' actions on mimic and basic sequence windows. DONE.

VLT guide probe can be positioned above an allocated reference star. (This
is part of a deeper problem, which is that allocated targets remain
allocated even after a change of fibre combination.) DONE.

Expert mode should be unavailable unless a copy called 'configure_expert'
is being used. DONE.

8th Nov 2001.

Need additional feedback about allocations by fibre type, distinguishing
between sky and target objects. DONE.

10th Nov 2001.

Should disallow a write to PAF (except in expert mode) unless enough guide
stars are allocated and a VLT guide star is provided. DONE.

13th Nov 2001.

Tentative de-allocation stage should only happen if more fibres could be
allocated (not just if there are unallocated pivots, since not all CAN be
allocated!) DONE.

HA test should be done with 'standard' limits, not the restrictive ones
used for the configuration. DONE.

20th Nov 2001.

Need to fix UVES allocation problem, ideally by having a way to specify
how many fibres of each type should be allocated to sky. DONE.

(This version sent to ESO for evaluation)

Sort out the proper module system for ESO. Needs to go into CMM. DONE.

21st Nov 2001.

Under HP-UX, allocation crashes - undefined TCL code returned. DONE. 
Updated in CMM.

27th Nov 2001.

Soak test allocations to see what angle etc parameters are needed to give
configurations safe over 4hours HA range and wavelength range. DONE.
Answer appears to be that 15% more constrained than the actual limits used
by the positioner. This has now been built in to the code.

Sky targets as well as fiducial targets should be included in a list of
'unallocated' targets, even if allocated. DONE.

Selecting the same fibre combination as for the previous configuration
leaves the 'select combination' button unticked. DONE.

28th Nov 2001.

Need to remove debug output being produced when Oxford algorithm used. DONE.

With new style for sky handling, 'Allocate sky grid' should be 'Generate
sky grid' and should not attempt to allocate. DONE.

3rd Dec 2001.

User manual.  Done for PAA (A), but needs revising as per comments
from Luca and Manuela for PAA (B). DONE.

Manual should encourage use of 'S' as general sky type, and 'M' for 
Medusa. DONE.

Manual should discuss any problems connected with stuffing PAF files by
sending them as attachments (the carriage return problem). DONE.

4th Dec 2001.

(Following PAA(B) session with Luca)

Manual allocations should not be allowed to exceed the maximum fibre
length. DONE.

5th Dec 2001.

UVES_8 is to be fibre 235 and UVES_7 is to be fibre 103. This is to
be implemented in FPOSS and also when the UVES fibres are assembled. DONE,
(Still has to be assembled, but FPOSS has been changed, and PG is now aware
of the agreed convention.)
    
Wavelength display should be removed from the control panel for FLAMES. DONE.

Wavelengths (now only shown in set wavelength dialogue) should be in
nanometres instead of angstroms for FLAMES. DONE.

Changing telescope parameters (ie ARGUS angle) should invalidate VLT
guide star selection. DONE.

6th Dec 2001.

Sort out the proper name for the PAF file. It appears that it should indeed
be .ins. DONE.

10th Dec 2001.

PAF.ID and PAF.NAME fields should not contain blank characters. DONE.

B-V values are not parsed correctly when the values are +ve. Strictly, they
contain a leading blank in the value field, which the format didn't expect.
Such leading blanks should be accepted. DONE.

3rd Jan 2002.

Clearance parameters used for manual allocation should be the same as
those used for automatic allocation. DONE.

PAF file should include the INS.OSS.VER keyword. DONE.

24th Jan 2002.
   
The directory structure should be revised into a more logical format,
with separate sub-directories for distinct modules such as SDS, SLALIB etc.
It should be possible to go into the src directory and type 'make' to
make the system - on all supported systems. DONE.

5th Feb 2002.

There should be a checksum implemented for the PAF file. DONE.
(Almost done, actually. The code is written and tested, but a) I am still
waiting for a copy of the ESO test code 'paf-checksum' to verify that 
the checksums are correct, and b) the code is currently disabled, because
Dan doesn't want to complicate the testing at the moment.

Provide a way to save a list of allocated objects in skycat format. DONE.
(However, I am still waiting for feedback from ESO as to the best format
to use, and this may need tweaking.)

Check the humidity (50%??) and other default settings for the VLT. DONE.
(Humidity now 20% for FLAMES)

Implementation of 'change field center' is awkward. DONE.

6th Feb 2002.

Provide a way to save a list of allocated objects in skycat format. DONE.

12th Feb 2002.

Clearance values need to be settled on and documented. DONE.

References to 'guide star', 'FACB target', 'reference star' are inconsistent.
Should always use 'reference star'. DONE.

The manual should emphasise that the PAF file should not be edited. DONE.

All reference to expert mode should be removed from the user manual and
moved to the internals manual. DONE.

Internals manual should document the location of tolerance values etc
and explain steps ensure they keep in step with those used by the
positioner. DONE.

18th Feb 2002.

Fix compilation warnings on some systems from fpilmodel.c. DONE.

25th March 2002.

We agreed to add code to investigate the best way to handle multiple
wavelength observations. DONE.

11th April 2002.

Ideally there should be some indication of disabled fibres
when showing fibre details. DONE.

For testing, there should be a way of forcing all fibres to be treated as 
in use, ignoring the 'in use' flags in the instrument status file. (Now
handled by the -use_all_fibres command line option in expert mode.) DONE.

4th June 2002.

PAF file name should follow the conventions specified in mail from Luca and
Andreas. PAF.ID and PAF.NAME need to include the date and fibre combination
in use, as shown in the same mail. DONE.

6th Aug 2002.

Need to check guide probe dimensions - comparison with VLT image suggests
value used for guide probe pivot circle radius may be wrong. DONE. (Pivot
radius value was correct, vertex list was innacurate and has been changed.)

In CONFIGURE, when using UVES6, the two fibres NOT used must be
retractors 235 and 103. Please correct it in both programs. DONE.

New definition of INSMODE to be inserted in CONFIGURE; this is just
a small change - see separate email by Schmutzer and Kaufer. DONE.

After a sky grid is allocated, fibres can be allocated manually to sky
grid targets under the guide probe. DONE.

FPOSS needs to use latest version of fpcol model code, and include latest
version of the instrument status file (modified to reflect how the
system should look). DONE.

8th Aug 2002.

SetPlate in 2dF mode needs to be run twice to have an effect. DONE.

Check over hour angle range fails in non-expert mode with an undefined
variable WavelengthCheck. DONE.

22nd Aug 2002.

Sky angle for guide stars in PAF file. DONE.

Reading a PAF file doesn't set number of allocated guide stars properly. DONE.

Latest version of Fpcol needs to be used. DONE.

Generated sky targets can be allocated under the guide probe. DONE.

26th Aug 2002.

Fibres parked off the line from pivot to field center have their bend angles
calculated incorrectly. DONE. (Note that 2dF positioner code needs this fix
before FPOSS is used for 2dF use - an AAO internal matter only).

28th Aug 2002.

Reading in a PAF file does not set the mode (fibre combination) to that used.
DONE.

PAF.NAME and PAF.ID items are confused (the mode etc appears twice) when a
PAF file is read in and then written out again. DONE.

2nd Sep 2002.

Allocation and swap phase of the 'Oxford' algorithm is inadequately 
commented. DONE.

Not all possible allocations are checked during the swap phase of the 'Oxford'
algorithm. DONE.

5th Sep 2002.

Need to reinstate the count of unallocated objects in the field that used
to be included in the main panel - objects, sky, guide. DONE (These now
show up in the 'available targets' panel, giving a breakdown by target type
rather than just the bare total counts.) 

When reading PAF files back in the guide star is sometimes lost. Appears to
occur inconsistently. DONE (Believe this only happened if the guide star
position had changed - for instance if the date or HA or other astrometric
data was modified. This has been fixed.)

Need to prevent allocating a fibre behind its park position. (Only a problem
for FACBs - TJF has a fix in his BEHIND_PARK code.)  DONE.

When you set a new field center, the main display of the field center is
not updated. DONE.

File dialogues are inconsistent about their initial directory setting. They 
should all go back to the last used directory. DONE.

11th Sep 2002.

Repeating an allocation - doing 'allocate' and then 'allocate' again
immediately - initially confuses the allocation count displayed in the
basic sequence. DONE.

12th Sep 2002.

Not all dependencies are in the makefiles. DONE. (System-specific makefiles
were correct, but the layered makefile structure meant they weren't always
being executed.)

16th Sep 2002.

6dF allocations constantly complain about invalid fibre positions. DONE.

FPOSS assumes that /usr/ucb/lpr is the correct way to print a file. Often it
isn't, and there should be a way to specify alternative printer commands. DONE.

17th Sep 2002.

When you tell configure to set a certain number of fibres to sky, if you have
a total number greater than the available number of sky objects, it fills
up spectrograph #1 first.  It should do each in turn, giving each roughly
equal numbers. (This was a 2dF problem) DONE.

Tentative deallocation is incompatible with the 'Oxford' algorithm. DONE.

18th Sept 2002

Uncrossing is disabled unless the 'Oxford' algorithm is being used. DONE.
(This doesn't seem to cause any problems, but may need more testing.)

Setting fibre combination to guide fibres only didn't work for 2dF. DONE.

25th Sept 2002

Opening an existing SDS file fails. DONE.

Default input and output directories should be maintained separately. DONE.

26th Sept 2002

Leaving fibres unallocated for sky doesn't work for 6dF. DONE.

1st Oct 2002

6dF only has one spectrograph! Not all parts of the code seem to know this.
DONE.

2nd Oct 2002

Sky target counts are incorrect after sky grid allocated. DONE.

Allocation code leaks memory from the Pivot and ConeTargets arrays. DONE.

17th Oct 2002

Code needs to include latest version of fpcol and needs to be modified
to match the changed calling sequence for FpilModelCvtInit(). DONE.

19th Oct 2002

In certain circumstances, FPOSS gets the 'POS' and 'NEG' calculation wrong
for the VLT guide probe. (Fix determined by Andreas Kaufer at Paranal.) DONE.

Atmospheric pressure default value is wrong for Paranal. DONE.

Determine the actual offset between ARGUS angle and position angle. (This
is now thought to be understood - there are three angles involved, the one
written to the PAF file, the angle displayed and entered using the GUI, and
the one passed to the astrometric code, and the relationship between all of
these is now understood, I believe.) DONE.

21st Oct 2002

SDS files for 2dF are incompatible with versions produced by earlier
versions of configure. DONE.

23rd Oct 2002

After using the Argus mode and saving the file, if you load another file,
you are stuck with the argus angle you previously selected. (This is from
the list of Luca's comments passed on by Tony. In fact, what was happening 
was that it reverted to the wrong default angle.) DONE.

If you change fibre type after selecting Argus angle, you are left with the
applied Argus angle and can't change it. (Entering all the standard modes other
than Argus should remove the Argus angle.) (This is actually part of the
previous problem, I think. Entering a standard mode made FPOSS revert to an
incorrect default angle, and this can't be corrected through the ARGUS angle
GUI, since this has no effect with ARGUS not in use.) DONE.

If you change the argus angle, you have to reselect the guide star (it
should select the same one again automatically). DONE.

5th Nov 2002

Question of rotator offset angle in PAF file. May not be needed if both FP OS
and FP OSS use the same default convention for the rotator angle.  
(Not needed - see next entry.) DONE.

The entry TEL.OFF.ROTANGLE can be removed from the PAF file- it is not being
set and apparently the required information is worked out later
in the system. (From TJF notes - I assume TEL.ROT.OFFANGLE was meant.) DONE.

Proper motion specifications in .fld files are not being taken into account
when positions are calculated. DONE.

FPOSS should allocate with a slightly shorter maximum fibre length, to allow
for atmospheric pressure changes. (It should check allocations with the
proper length.) DONE.

Minor, but important. AAO logo should be replaced with the ESO logo. (Both
now appear when FLAMES is in use.) DONE.

12th Nov 2002

Creating a sky position after a configuration has been read from a PAF
file (with no unallocated targets) doesn't work properly - target shows
up when selected with the wrong name and details. DONE.

If you have an unallocated fibre selected when you create a single
sky target using command-middle_button, FPOSS will try to allocate it
even if it is under the VLT guide probe. DONE.

18th Nov 2002

If ARGUS settings dialogue is closed without apply having been selected,
the mimic display doesn't show the default ARGUS angle. DONE.

21st Nov 2002

Paranal would like to see UTDATE optional in the .fld file, and would like
to see the 'change wavelength' and 'change obs date' menu options made
expert only. DONE.

-------------------------------------------------------------------------------

Missing features:
-----------------

Have an iterative mode for allocating a field with a large number of targets.

Magnitude filter and fibre combination dialogues should have an 'OK' button,
that does an "apply and close" (but doesn't close if there is an error).

Expert mode should allow you to remove (and recover) the basic sequence
dialogue.

A more flexible magnitude filter dialogue might also allow 'n objects around
mag x'.

Dialogue suggesting you apply a magnitude filter should provide some list of
numbers at each magnitude. Might also have a button that brings up the
magnitude filter dialogue.

Aspects of the program that aren't sorted out yet:
--------------------------------------------------

Check on format of PAF files - e-mail from Tim(?). I think this is not an issue,
since it seems to be a question of corruption of files by Netscape or some
similar e-mail program. The manual says only to e-mail gzipp'ed files.

Check on (V-R) cf (V-I) - ESO doco says V-R, file had V-I.

Guide star limit - can 29 arcmin be used?

VLT guide star mag range - need to find out what it is.

ARGUS angle limit should be 0 to 180, and FPOSS should determine best
of the two possible rotator angles to use.

Not clear if the PAF file checksum code should be switched in or not.

The guide probe mimic of CONFIGURE is systematically slightly
different from the guide probe on the VLT, and some vignetting may
be produced. Suggest enlarging the probe shadow by 2-3 arcseconds
in CONFIGURE to allow deviations from 45 degrees position angle. - Have
changed guide probe vertex list to match ESO-supplied list. Will see if
there still seems to be a problem.

With a very limited number of targets (see e-mail from Tony for the .fld
file), the Taylor algorithm - in all varieties - produces skewed configurations
while the Oxford algorithm produces straight ones. [This is just the way
the Taylor algorithm works - it could be made to do 'hardest target' and
then 'choose fibre', rather than 'hardest fibre' and then 'choose target',
but this would have to be an additional option.

Bugs etc:
---------

There are problems connected with collisions with FACBs parked in the 
field. It isn't clear if FPOSS needs to handle this, since they aren't
intended to be there once the FACB positioning problems are fixed. [This
isn't something that FPOSS needs to deal with - the new FACBs will 
be parked properly.]

Need to bear in mind 'inUse' flags for fibres when calculating allocation
stats. [This is relatively unimportant - it only really matters if a lot
of fibres have been flagged as out of use, mainly during testing.]

FPOSS sometimes gets confused about if it has allocated sufficient FACBs, and
so won't allow a configuration to be written to a PAF file. This occurred when
reading in a PAF file and that has been fixed, but TJF says there appear to 
be other occasions when this can happen.

'Uncross' option doesn't actually do anything if used with 'Taylor'
allocation algorithm.

The system generates warning messages in cases where incompatible allocation
options are used, but these are lost.

Housekeeping:
-------------

Remove the FPIL test conditional code.

Code documentation up to scratch. Continues to improve, but will never
be perfect. (Iterative algorithm documentation now much improved.)

Error messages can be long and confusing.

The way some allocation options have been implemented breaks the clean
split between allocation code and user-interface - the user interface TCL
code knows the parameter details (ie that a given parameter exists and that
it has such and such a number). This is not an operational problem, but it
makes it hard to modify the algorithm parameters in any way.

Users manual doesn't mention that UTDATE is optional for FLAMES, and
still shows 'change wavelength' and 'change obs date' options in the menus.
The illustrative screen shots all date from before the 45 degree offset
was added, so don't show the compass points as they actually appear now.

2dF-specific issues:
--------------------

(These are really AAO internal issues, but keeping them recorded in this file
helps me keep all issues connected with the code in one place.)

Program should not reject a file just because target names are not unique.

Should be a way to see the maximum clearance etc parameters in the dialogue
that allows them to be set. 

Button twist should not be visible.

Code currently uses 6000A as the 2dF/6dF guide wavelength. Is this right?
Or does the positioner just use the observing wavelength?

There used to be a common error 'Error compressing the unallocated
structures' on saving. Nothing to do except abandon the configurastion and
start again. I just got this with the new version also - from Will Saunders.

It would be very helpful to have the highlight colour for the selected
button and target different to the highlight colour for targets selected
by eg priority - from Will Saunders.

Something minor and new to ask: would it be possible to have weight=0
targets legitimate (currently they cause an error on reading into
configure), but never displayed or configured? I ask because we often have
targets we do not want to observe (eg bright stars, spurious sources etc),
there is currently no easy way to flag these. I have been putting an * in
front of them, but this screws up the formatting. - from Will Saunders.

The input .fld file cannot specify that a target is only to be allocated to
a specific 2dF spectrograph. (The option of specifying a target as type 'PA'
does not work.)

The 6dF field plates are described as 0 and 1, whereas the 6dF usage is
1 and 2.

Fibre uncrossing after each priority level should be a non-expert option.
(This may be OBE, given the changes to Gavin's code recently.)

Auto-reallocate may not work in all cases. See TJB mail.

If you select "fibre uncrossing after each priority pass", it
doesn't remember this when you run allocate again

Number of allocated objects shouldn't include fiducials (a very
minor thing)

Trouble reading shanks.fld (which can be read with old configure),
gives this error:

   Error: syntax error in input file line
   Not all required fields provided, or some specified incorrectly
   Line starts '76120 0 57 37.9703 -27
   Error was in line 5
   Error reading file '/data/tjb/configure/tests/shanks.fld'

   this file looks like:

   LABEL GSGP4
   UTDATE 2002 09 01
   CENTRE 00 57 55  -27 34 00
   EQUINOX J2000.0
    76120   0  57    37.9703  -27  15    56.7364  F 9     14.5000
    70955   0  56    53.2658  -27  20    4.08910  F 9     14.6000
    84956   0  59    3.96205  -27  25    35.4741  F 9     14.6000
   **It's not really a bug. It's because Configure is expecting at least 11
   fields (ie. one more field after magnitude)**

Leaving N fibres for sky doesn't work if you allocate to one
spectrograph only (e.g. ELAIS... spectro#1 only).  Allocated 199
fibres to objects, none to skies (39 skies were available)
It's also confusing having both: "Number of fibres to leave for sky"
and "Number of Spect 1 fibres to assign to sky".

Does Rotate Button (in expert mode) actually do anything?  This
should be removed

Manual allocation doesn't seem to be being checked properly. This was
reported by TJB, but is in fact a problem connected with the change to
the way the bend angle is calculated - the new version calculates the
angle between the new fibre and the line joining pivot to field center, the
old version calculates the angle between the new fibre and the actual
park position. So if a fibre was parked away from the line joining its
pivot to the field center - and fibres can be up to 5 degrees out on
occasion - the two codes disagree. The new configure is right, the old
configure and the positoner code itself are wrong. The 2dF positioner code needs
to be modified, and until this is done this will cause occasional problems.
(The problem is nothing to do with manual allocation - it just happened to
show up when manual allocation was being used.)

Remaining items from Luca's post comm3 list
-------------------------------------------

    c) Insert the option of saving allocated and skys  in SKYCAT format
(current option is NOT in skycat format..) [I can read it into skycat. Still
trying to get this aspect clarified; it may be that they only had access 
to an older version during comm3 because of Cmm problems. Mail from
Luca suggests this is the case, but I've not seen this confirmed yet - KS]
    e) Synchronization of configure and LCU SW. This is very important. [Every
time there is a change to the fpcol module this needs to be reflected in FPOSS.
At present the two are in synch, so this is really just a reminder that
they need to be kept that way. This is really a documentation issue - the
internals manual may need more detail about this.]
    f) Make configure portable, agree with Paranal and test portability. [It
is portable, at least in terms of building on different systems.]
    g) Often Configure allows a configuration which is later rejected by the
deltatask because of  collisions. This would be a MAJOR handicap for service
mode, unacceptable. [This appears to be a question of differences in park
positions on the two plates - FPOSS assumes that what is OK for one
is OK for both, and at the moment this isn't the case. - KS]

From Luca's mid-comm4 list
--------------------------

Delta reveals collision not detected by configure. [The details of this are
unclear; it may be that this refers only to the problems connected with
fibre length and atmospheric pressure, or there may be other issues. KS.]

Reported by Dan from comm4
--------------------------

2. It recently happened that fibres were assigned under the guide probe.
Most likely, this is a new bug introduced by correcting the POS and NEG
orientation of the probe. [This doesn't seem to be the case - I was able
to allocate a fibre to a manually created sky under the guide probe, but
I don't know if this is the whole story - it is now fixed.]

3. With a small number of targets (20-30), the 'straightest' algorithm
gives very strange results involving high number of crossings. [This is
also mentioned in the section 'aspects not sorted out yet' where it's
said that this is probably best addressed through the manual.]
