\documentclass{mem}
\usepackage{natbib}\usepackage{txfonts}\usepackage{balance}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[a4paper]{hyperref}
\idline{75}{282}
\begin{document}




\title{
Optimised target allocation algorithm for multi-fibre fed spectrographs at E-ELT
}

   \subtitle{}

\author{
S. \,Rota \,
 \and \, B. \,Garilli         
 }

  \offprints{S. Rota}
 

\institute{
Istituto Nazionale di Astrofisica --
IASF Milano, Via E. Bassini 15,
I-20133 Milano, Italy 
\email{stefano@lambrate.inaf.it}
}

\authorrunning{Rota}

 
\titlerunning{Optimised target allocation algorithm}


\abstract{

In fibre-fed multi-object spectrograph, an optimised algorithm is necessary to maximise the number of allocated fibres on pre-selected targets and decrease the number of unused fibres during each observation.
We present some criteria in the assignment of targets to fibres in order to obtain an optimised solution between several possible configurations.
We also consider a particular situation in which half of the fibres are allocated on targets and the other half is used to observe sky positions.
Applying the algorithm to the known distribution of $\rm{\sim 1000}$ fibres of the MOONS spectrograph, we obtain encouraging results.


%\keywords{Stars: abundances --
%Stars: atmospheres -- Stars: Population II -- Galaxy: globular clusters -- 
%Galaxy: abundances -- Cosmology: observations }
}
\maketitle{}





\section{Introduction}

One of the instruments that will be mounted at E-ELT is a fibre-feb multi-object spectrograph (MOS). 
Given the high number of fibres (hundreds) in new generation MOS, an optimisation code devoted to maximise the allocation of fibres is necessary to increase the efficiency of the spectrograph at each observation.
An optimisation strategy in the allocation of fibres can be adopted when there are overlapping zones in the displacement of fibres in the telescope field of view (FOV). 
Any allocating algorithm should avoid situations in which a fibre cannot be allocated to anything because its only reachable target has already been allocated to another fibre.
A random allocation of fibres can encounter lots of cases like this, decreasing drastically the efficiency of the spectrograph. 

Here we present an optimisation code that can be extended to any possible MOS configuration.
The basic idea can be extrapolated for any general distribution of fibres.
The algorithm should also include in its process the scientific priority of targets, trying to allocate firstly objects with the highest priority.
Another non-negligible effect which must be taken into account is the fibre collision that, depending on the fibre size, can strongly affect the efficiency of the spectrograph in the allocation. 
We have studied two possible observing strategies: a general case in which all available fibres are used to observe targets such as galaxies or stars, and a second observing mode where only half of the fibres are placed on targets and the remaining half is left to observe sky positions. 


\section{Optimised algorithm for fibre allocation}
\label{second}

The first algorithm studied has been thought to maximise the number of allocated fibres on pre-selected targets.
Assuming to know the general configuration of the spectrograph, as the positions of the fibres in the telescope FOV and the region where each fibre could be placed,
the input parameters of the optimisation code are the positions of the allocable targets.
The first step of the optimisation process consists in building the list of targets that can be reached by each fibre. 
Following \citet{morales}, we proceed to eliminate from the longest lists all targets which can be reached by another fibre. 
In the end each target is associated to only one fibre while the number of targets associated to each fibre is relatively small.
The second step allocates one target for each fibre. 
We start by the fibre for which only one target is available. 
Whenever more than one target is available, we check for fibre collisions and choose the target with no conflicts and the lowest probability of collisions.




The sky subtraction from spectra is a critical issue in particular when observations are performed in the near infrared. 
A possible strategy to deal with the sky emission problem is to use half of the available fibres to observe targets and the other half to observe sky positions.
In order to obtain the best sky subtraction, each target should have its own corresponding sky position which must be observed very close to the target itself.
The sky positions are also chosen in order to perform an ABBA nodding strategy:
the distance vector between the target and the sky is always the same so that, after the nodding, each fibre allocated on a sky position should end on the target itself, while the fibre allocated to the target will end up on another sky position. 
One must verify if the two sky positions associated to a target are observable or not, testing if those positions do not fall on a back/fore-ground source. 
In the ``bad'' situation in which the sky position ends up on a background source the target is discarded from the selectable object group. \\
Since for this observing mode strategy the allocation should be performed trying to maximise pairs of object/sky, the optimisation is not performed as before. 
For each fibre we build a list containing not only targets but also sky positions reachable by that fibre. 
To optimise the pair allocation we select the target with the highest scientific priority and among the fibres that can reach its corresponding sky position, we choose the one that can reach the lowest number of targets. This criterion has been thought to avoid that fibres that can reach more targets would instead be used to observe sky positions. 
In the absence of priority, the selection between targets in the fibre list can be performed randomly.
Once the maximum number of pairs has been allocated, we verify if fibres are in conflict, in which case we discard one of the two, together with the associated sky position. \\
A free parameter in the computation of the best solution in allocating fibres to pairs of objects is the nodding direction and size. 
We run the optimisation algorithm over different nodding directions and sizes obtaining lots of solutions and choosing the one with the highest number of allocated pairs. \\
Once the maximum number of pairs has been allocated with the best nodding solution, the algorithm allocates the remaining fibres on single targets, searching between not-yet-selected objects. 
For these targets, the best sky-subtraction cannot be performed as for targets in pairs and the reduction pipeline will have to rely on a median sky.



\section{Results}

To evaluate the efficiency of the optimisation algorithm, we consider the extreme situation of the MOONS spectrograph, an instrument already under construction which will count more than $\rm{\sim 1000}$ fibres.
The MOONS spectrograph will be mounted on the VLT at the Nasmyth focus with a FOV diameter of 25 arcmin.
Fibres are distributed in a sort of grid pattern to cover the entire focal plane of the telescope. 
Each fibre could be placed by a robotic positioner inside a circle with diameter 25 arcsec centred in the positioner position.
The positioner cannot place the fibre on its own center but can reach the center of its neighbour positioners in order to cover the whole focal plane.
With this configuration, each target in the telescope FOV can be observed from 1 up to 4 positioners and an optimisation code is possible due to the overlapping patrol zones.

As input data we use the COSMOS photometric redshift catalogue v1.5 \citep{ilbert}, moving the pointing centre around and obtaining 9 independent fields.
We have performed two sets of simulations: a bright sample where we select galaxies more luminous than $\rm{K=22.5}$ in the redshift range $\rm{0.8<z<1.4}$ and a deep sample consisting of galaxies more luminous than $\rm{K=23.5}$ and at $\rm{z>1.4}$.
The number of available objects in the FOV is of the order of $\rm{\sim1000/FOV}$ for the bright sample and $\rm{\sim2500/FOV}$ for the deep case.

To have an idea of the efficiency of the optimisation algorithm we define two quantities: the filling factor (FF) is the number of allocated fibres with respect to the total number of available ones and the sampling rate (SR) is the ratio between the number of observed objects with respect to the total number of targets in the telescope FOV. 




%FIGURE
\begin{figure}
\centerline{\includegraphics[width=75mm,angle=0]{stare.eps}}
\caption{Optimised configuration in allocating fibres on single targets for one of the 9 fields in the bright sample case. Positioners allocated are shown connected to a dotted symbol which represents the position of the target. Dots and crosses without a connection correspond respectively to targets and positioners not allocated.}
  \small    
\label{stare}
\end{figure}

\begin{figure}
\centerline{\includegraphics[width=75mm,angle=0]{xswitch.eps}}
\caption{Optimised configuration in allocating fibres on target/sky pairs. Positioners allocated to a target/sky position are shown connected to a dotted symbol, while positioners allocated to targets without a related sky positions are connected to a dot inside a circle. Dots and crosses without a connection correspond respectively to targets and positioners not allocated.}
  \small    
\label{xswitch}
\end{figure}

\subsection{Fibre allocation results}
We apply both algorithms explained in the previous section to the 9 fields of the bright and deep samples of the COSMOS catalogue and show the averaged results in Table~\ref{tabl}.
Figure 1 shows an example of the allocation obtained for one of the 9 bright fields considering the first algorithm: crosses connected to a dot indicate the distribution of positioners for which a target, shown with dotted symbol, has been found while crosses alone are positioners without any target allocated. \\
The behaviour of the FF and SR depends strongly on the target surface density in the telescope FOV. 
The FF is almost $\rm{100\%}$ in the deep sample case because each positioner can choose between lots of targets, maximising the allocation.
Given the limited size of the positioner arms and the fibre itself, $\rm{\sim 1}$ arcsec on the sky, the collision avoidance zone is relatively small.
Taking it into account, the FF decreases only by $\rm{1\%}$.  
In the bright sample fields, the FF is $\rm{75\%}$: the $\rm{25\%}$ loss is mainly due to the fact that given the relatively low target surface density, some positioners do not have any target to be allocated to. 
Only a small quantity of $\rm{5\%}$, already accounted for in the total loss, is due fibre conflicts which are more important in the bright sample due to the fewer degrees of freedom with respect to the deep case. 
When the number of targets is comparable with the total number of available fibres, as in the bright sample fields, the SR averaged over all 9 fields is of the order of $\rm{70\%}$. 
In the deep sample instead, due to the limited number of available fibres with respect to the total number of selectable objects, the SR is much lower, $\rm{37\%}$, even if all fibres have been allocated.





\begin{table}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
 & FF (\%) & SR (\%) \\
\hline
single targets  &$ 75/98 $ & $ 70/37   $ \\
pairs  &$ 77/87  $ & $ 35/19  $ \\
pairs + targets  &$ 85/95  $ & $ 43/22  $ \\
\hline
\end{tabular}
\end{center}
\caption{Averaged FF and SR over the 9 fields for the bright ($\it{left}$) and deep ($\it{right}$) sample for the algorithms designed to maximise single target allocation (single targets), allocation of target/sky pairs (pairs) and pairs with the inclusion of single targets allocation for those fibres not assigned yet (pairs+targets). }
\label{tabl}
\end{table}



We apply to the same input catalogue the second optimisation algorithm described in section \ref{second} with the goal of maximising the allocation of target/sky pairs. 
We run different times the code for each field of the bright and deep samples to measure the best nodding solution in which more pairs have been allocated.
A configuration for the fibre allocation for a field in the bright sample is presented in figure 2, where positioners allocated to targets coupled with positioners allocated to their corresponding sky position are shown connected to dotted symbols while positioners selecting single targets are recognisable because connected to dotted symbols inside a circle. 
The horizontal nodding direction chosen is recognisable from the figure. 
In this example the nodding distance is 20 arcsec. \\
The choice of the nodding affects more the bright sample fields because the number of targets is smaller: adding a new free parameter can make a stronger difference when the number of possible solutions is limited. \\
The FF averaged over all the 9 fields of the bright sample is $\rm{77\%}$, similar to the one obtained for the previous algorithm, while for the deep case is $\rm{87\%}$, smaller by $\rm{10\%}$ with respect to the results relative to the allocation of single targets. 
The difference in the deep sample is due to the fact that in this case, 1) we are more constrained due to allocation of pairs of objects instead of considering independent single targets and 2) we are not pre-selecting targets choosing the ones with less conflicts, and the conflict check is done a posteriori. 
The number of fibres lost because of fibre conflicts is of the order of $\rm{7\%}$ for both the bright and deep samples and the results shown are already accounting for the depletion due to conflicts.
As expected, the SR averaged over all 9 fields is more or less half of the SR obtained for the previous case because only half of the fibres could be used to select targets.
Adding to the FF measure the number of fibres that do not belong to a pair but can be allocated to single targets, we improve the results: an average of $\rm{95\%}$ fibres for the deep sample and $\rm{85\%}$ for the bright sample have been allocated. \\




\section{Conclusions}

In our study, we discuss a general process to optimise the target allocation in fibre-fed multi-object spectrograph.
We have focused on two observing strategies: one with the aim of maximise the allocation of fibres on single targets, the second concentrated on target/sky pair optimisation in order to obtain the best sky subtraction.
The algorithm has been thought to be more general as possible in order to be adapted to any multi-fibre spectrograph configuration at E-ELT.
We test the efficiency of both methods on a known distribution of galaxies on sky using the configuration of the MOONS spectrograph. 
Results are good, in particular when the number of targets is much bigger than the number of available fibres where almost all fibres can be allocated.




















\bibliographystyle{aa}
\begin{thebibliography}{}


\bibitem[Morales et al.(2012)]{morales} Morales, I., 
Montero-Dorta, A.~D., Azzaro, M., et al.\ 2012, \mnras, 419, 1187 


\bibitem[Ilbert et al.(2008)]{ilbert} Ilbert, O., Salvato, M., 
Capak, P., et al.\ 2008, Panoramic Views of Galaxy Formation and Evolution, 
399, 169 


\end{thebibliography}


\end{document}

