Our method finds globally optimal (in terms of numbers of camera placements)
solutions to place 360∘ cameras that together completely cover all visible
regions of interests (ROIs) of an indoor environment. We model the indoor
environment according to the public area of a real-world floor plan of an
office building (left), and set the ROIs to be the walls of the area. The
three shown solutions ((a) to (c)), are one that has no constraints (i.e., the
360∘ camera is omnidirectional and can see infinitely far away), one that has
a maximal range constraint (orange), and one that has both a maximal range and
an angle-to-wall constraint (w.r.t. surface normals) of 45 degrees.

# Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments by
Integer Programming

Syuan-Rong Syu1 and Chi-Han Peng10000-0002-6823-8029
National Yang Ming Chiao Tung University1

###### Abstract

We propose a computational approach to find a minimal set of 360∘ camera
placements that together sufficiently cover an indoor environment for the
building documentation problem in the architecture, engineering, and
construction (AEC) industries. Our approach, based on a simple integer
programming (IP) problem formulation, solves very efficiently and globally
optimally. We conducted a study of using panoramas to capture the appearances
of a real-world indoor environment, in which we found that our computed
solutions are better than human solutions decided by both non-professional and
professional users.

<ccs2012> <concept>
<concept_id>10010147.10010371.10010372.10010377</concept_id>
<concept_desc>Computing methodologies Visibility</concept_desc>
<concept_significance>500</concept_significance> </concept> </ccs2012>

[500]Computing methodologies Visibility

##  1 Introduction

Taking photos to record and document the interiors of a building is an
important task in architecture, engineering, and construction (AEC). For
examples, during constructions of a building, firms have to document the
progress by taking numerous photos, over time, of the interiors of the
building or the jobsite [Ope22]. In insurance and restoration, surveyors have
to thoroughly document the state of a damaged building for repair cost
estimations [Mat22]. Real-estates agents shoot photos of the interiors of
houses for sale. Even in retail and hospitality, owners have to showcase the
appearances of the indoor spaces to customers. A growing trend is to replace
traditional perspective photos by panoramic photos, or "panoramas" in short,
shoot by 360∘ cameras. The main reason is that a panoramic photo covers nearby
every angles seen from the camera position (except for the top and bottom
nadirs), vastly reducing the numbers of photos need to be taken.

Even though 360∘ cameras shoot photos omnidirectionally, to capture an indoor
environment, multiple panoramas are still likely needed due to occlusions and
ranges of the cameras. Traditionally, photographers decide placements of the
360∘ camera strategically by intuition and simple guidelines (e.g., placing it
at the centers of rooms, plus a few more to capture occluded parts). However,
such solutions may not be most economical in terms of the numbers of panoramas
taken. Worse, some parts of the indoor environment may not be captured at all
due to human miscalculations.

In this paper, we propose a optimization-based approach to the 360∘ camera
placement problem. In short, we aim to minimize the number of panoramas taken
that together would sufficiently capture all visible parts of an indoor
environment. We formulate the problem as a linear integer programming (IP)
problem, which can be solved globally-optimally and very efficiently by modern
off-the-shelf solvers such as Gurobi [Gur22]. Note that in our IP formulation,
the visibility ranges of the 360∘ cameras can be modeled in straightforward
manners.

We narrow our scope by making the following assumptions. First, we assume that
the indoor environment is largely clutter-free, which means that it is
adequate to encode the indoor environment as a 2.5D model (i.e., a 2D
floorplan "extruded" vertically by a given height) consisting of planar faces
presenting the walls, floors, and ceilings. This assumption makes sense for a
variety of cases such as unfurnished houses and the public areas of large
buildings. Second, as we focus on solving the camera placement problem, we
assume the 2.5D model of the indoor environment is given. For example, pre-
modeled according to the floorplan of the building. In other words, our method
can be used as a planning tool before the photographer actually go to the
jobsite.

To verify the usefulness of our method, we set up a study to simulate the
usage of 360∘ cameras for indoor environment documentation. First, we build a
2.5D model of our department according to its floorplan, and then compare our
computed solutions versus solutions decided by amateur users and one
professional architect. We find that our solution uses fewer panoramas to
completely cover the whole indoor environment. In fact, the human solutions
are often incorrect as some parts of the environment were not captured.
Second, we estimate the visibility ranges of popular 360∘ cameras used in the
AEC industry through experiments, and used the estimated ranges in our IP
formulation.

Our contributions are summarized as follows:

  * •

We propose a computational approach to the 360∘ camera placement problem that
was previously mainly solved by human intuition. Our IP-based method is
simple, solves very efficiently by a modern off-the-shelf solver on a
conventional computer, and provides globally-optimal solutions. We also
demonstrate that it is straightforward to impose additional constraints, such
as the visibility ranges of the cameras, to the IP formulation.

  * •

We conducted a study of using panoramas to capture the appearances of a real-
world indoor environment, in which we compared our computed solution to
solutions decided by humans. We show interesting observations of human
behaviors, which may be useful for designing computational approaches in the
future.

##  2 Related Work

We discuss related work in three main topics: 1) common practices and
guidelines for 360∘ camera placement in the construction and real-estate
industries, 2) automatic camera placement in sensor network design, and 3)
visibility in computer graphics.

###  2.1 360∘ camera placement guidelines

In the Zillow Indoor Dataset paper [CHL*21], a simple guideline for placing
360∘ cameras to shoot virtual tours is described, which only regulated that
more panoramas should be taken in bigger rooms. Similar guidelines (i.e.,
shoot a panorama at every 2 meters apart) are suggested in a popular website
post [Pha21]. In the Matterport’s guide for construction documentation
[Mat17], they suggest the following steps for taking panoramas in construction
sites: 1) first, create a 2D drawing or floorplan of the site to plan the
paths in advance, 2) physically mark previous placements of 360∘ cameras for
easier revisiting, and 3) shoot panoramas in the middle of the rooms, plus
detailed 3D scans around the perimeters.

###  2.2 Automatic camera placement

The problem of automatic camera placement is an important topic in sensor
networks design. The main application is the setup of surveillance cameras in
large buildings such as malls, airports, and factories [GCW15, ES06, GXZY09]
and even urban areas [JCJL17]. Usually the task is formulated as an
optimization problem in which the user wants to use as few cameras as possible
to completely cover the regions-of-interest (ROI) of an environment [ES04,
GCW15], or alternatively, maximizing the coverage of the ROI with a limited
(budgeted) number of cameras [HL06, YCA*08]. Variations of the problem include
different ways to model the visibility of the cameras (e.g., conventional
directional cameras or omnidirectional cameras [GGS*09]), how the environment
is encoded (e.g., discretized into a set of grid points or continuously
encoded as a set of 2D polygons as in the the classical art gallery problem
[ORo87], and camera-to-camera relationships [GCW15, MWY*17]. We refer readers
to survey papers discussing coverage problems in sensor network design [Wan11,
MC13].

Mentioned previously, the art gallery problem (AGP) is a key topic in
computational geometry that is similar to our problem. In short, AGP asks for
the minimal placements of "guards" (or cameras) that see omnidirectionally and
indefinitely away to completely cover a 2D domain modeled by a set of polygons
[ORo87]. AGP are either solved discretely (by sampling the 2D domain and
possible guard placement locations into a discrete set of points), which can
be reduced to instances of the set covering problem [Gho10], or continuously
in which sub-optimal [AMP10, BL11] or optimal solutions [CdRdS11, TRS16] are
found. Our problem in the unconstrained form (for example, problem (a) in
Figure Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments
by Integer Programming) is equivalent to the special case of AGP in which only
the perimeters of the 2D domain need to be covered [BL11]. However, when range
or angle-to-wall constraints are applied, the problem is no longer an AGP and
existing algorithms are not directly applicable.

We now focus discussions on the discrete case. An important distinction of
related methods is how they actually solved the set covering problem, which is
a linear binary problem (LBP) and is NP-hard in nature. Earlier methods solve
the LBP by divide-and-conquer strategies [ES06, DOL06], heuristic greedy
methods [RRA*06], being relaxed to linear programming (LP) and then solved by
the conventional simplex method [SKR09], or genetic programming [vdHHW*09].
These methods reportedly often took hours to solve for medium to large
problems [GCW15]. Later, in 2015, Delbos et al. proposed to relax the binary
problem into a convex quadratic one by replacing the binary constraints with
box constraints and then solve the problem by an academic solver [DG05]. They
reported to reduce the computation time to seconds for problems with
visibility matrices with several millions of entries. In comparison, we
formulate the camera placement problem as a simple linear binary programming
problem and solve it using a modern off-the-shelf solver (Gurobi). We solve
our problems of roughly the same size as in [DG05] in less than one second.

###  2.3 Visibility in computer graphics

A closely related topic to camera placements is the study of visibility in
computer graphics, i.e., what can be seen in a 2D or 3D scene along a line,
from a point, from a line segment, from a polygon, etc. (quoted from the
survey by Bittner and Wonka [BW03]). Another exhaustive categorization of
visibility in 3D is done by Durand et al. [DDP96]. A survey about visibility
issues for first-person view applications in large scenes is provided in
[CCSD03]. In our paper, we consider the visibility of an omnidirectional
camera in 2D w.r.t. a closed loop of 2D lines that together encode an indoor
environment. This is a well studied problem in computer graphics, especially
in 2D game developments [Asa85, BHH*14]. However, we took additional
considerations, including minimal and maximal ranges (i.e., points too close
and too far away from the camera are considered non-visible) and angles to the
surface normals (i.e., surface points with directional vectors to the camera
position that deviate too much from the surface normals are considered non-
visible), that are less discussed in related work.

##  3 Method

We begin with problem definitions. Our goal is to find the positions of a set
of 360∘ cameras such that all regions of interest (ROIs) of an indoor
environment are visible from at least one of the cameras. Recall that we
assume the indoor environment is encoded as a 2.5D model in 3D, consisting of
a planar floor, a planar ceiling, and several planar walls. Together they form
a water-tight 3D model. We assume the direction of gravity is the -z axis.
Therefore, the floor and the ceiling are planes with normals aligned to the z
axis (i.e., x-y planes at different heights), and the walls are planes with
normals orthogonal to the z axis.

Figure 1:  Left: a floor-to-ceiling vertical line (blue) on the wall (black
rectangle) is encoded as a 2D point (blue) on the floor plane. The camera in
3D (orange point) is encoded as a 2D point (red) on the floor plane. The
encoding is adequate because in this case, the vertical field-of-view angle of
the camera, shown by the two orange lines, is large enough to completely cover
the vertical line. Right: a case where the camera is too close to the wall
such that the vertical line can no longer be completely covered.

To simplify discussions, we define the ROIs to be the walls of the indoor
environment only (excluding the floor and the ceiling). Recall that a 360∘
camera’s looking directions, in terms of spherical coordinates, span
completely horizontally ($0^{\circ}$ to $360^{\circ}$ in azimuth) and nearly
completely vertically ($k^{\circ}$ to $(1-k)^{\circ}$ in zenith, $k$ is the
"cut-off" vertical angle at the top and bottom nadirs). This means that the
visibility of a ceiling-to-floor vertical line (aligned to the z-axis) on a
wall w.r.t. a 360∘ camera can be encoded by a point in the x-y plane as long
as the 360∘ camera is not too close to the wall - that is, the 360∘ camera
either sees the whole vertical line or none of it. Explicitly, we assume the
distance of a 360∘ camera to a wall is not smaller than:

$cotangent(FOVy/2)*h,$ (1)

$FOVy$ is the vertical field-of-view angle of the 360∘ camera and $h$ is the
bigger value of the camera heights to the floor and to the ceiling. Note that
$FOVy$ equals $180^{\circ}-2k$. See Figure 1 for an illustration.

In this way, the visibility problem is simplified as a 2D problem in which the
indoor environment is encoded as a 2D piece-wise linear polygon of which each
edge corresponds to a wall, and each 360∘ camera is encoded as a 2D point. We
denote the former as the "boundary polygon" and the latter as the "camera
positions". The visibility problem then requires that all points on the
boundary polygon are visible from at least one of the camera positions - i.e.,
there exist a line in between the boundary point and the camera position that
doesn’t intersect with any other edges of the boundary polygon.

Same as in previous work [DG05], to speed up computations, we uniformly sample
the boundary polygon to be a discrete set of "boundary points", $B_{i}$,
$0\leq i<N_{b}$, $N_{b}$ is the number of boundary points. We also uniformly
sample the interior of the boundary polygon as "interior points", $I_{i}$,
$0\leq i<N_{i}$, $N_{i}$ is the number of interior points. We consider these
interior points as the candidates of 360∘ camera placements. We sample the
boundary polygon by lengths and sample the interior by grid positions.

To test if a boundary point is visible to an interior point, we use the
circular ray sweeping-based algorithm [Asa85] to tessellate the visible region
from an interior point inside the boundary polygon into a set of triangles. We
then enumerate boundary points that fall within the triangles of the interior
point. A walkthrough of the algorithm is provided in [Pat20].

The visibility problem now states that, for every boundary point, it is
visible from at least one of the placed 360∘ cameras (which lie on the
interior points). In addition to the visibility test mentioned previously, we
require that for a placed 360∘ camera to cover a boundary point, two
additional tests must be passed:

  1. 1.

The L2 distance in between should fall within a feasible range. The lower
bound of the range can be determined by equation 1 or by a user-specified
value (e.g., a 360∘ camera cannot be put too close to a wall due to physical
setups). The upper bound (i.e., the maximal visible range of a 360∘ camera)
can be determined by referencing the specification of the camera, or, as done
in our experiments, empirically determined by physical tests.

  2. 2.

The angle between the camera’s viewing direction and the boundary point’s
normal should not be greater than a upper bound. Again, we found the angle
upper bound by physical tests.

We now formulate the visibility problem as a linear integer-programming (IP)
problem as follows:

$\displaystyle\underset{X_{i},\ 0\leq i<N_{i}}{\text{argmin}}$
$\displaystyle\sum{X_{i}}$ (2) subject to $\displaystyle\forall B_{j},\
\sum_{k=0}^{n_{B_{j}}}{X_{j,k}}>=1,$

where $X_{i}$ denotes a Boolean variable indicating whether a 360∘ camera is
placed at $I_{i}$ (the i-th interior point). $X_{j,k}$, $0\leq k<n_{B_{j}}$,
enumerate the Boolean variables of potential camera placements at interior
points that cover boundary point $B_{j}$, $n_{B_{j}}$ is the number of such
interior points. In short, the goal is to find a minimal set of 360∘ camera
placements such that for every boundary point, at least one of the interior
points that cover the boundary point has a camera placed.

Figure 2:  The floorplan of our department that we used to model the problem
polygon in our optimization problems.

##  4 Results

Figure 3:  The shoot panoramas which are used to estimate the maximal range
and angles of our 360∘ camera (RICOH Theta Z1). In the top-row case, we found
that the camera could barely see the "classroom" characters clearly on the A4
paper at about 5.04 meters distance. Therefore, we set 5.04 meters as the
camera maximum visibility range in our research. In the second, third, and
fourth rows, we show panoramas shoot at different angles to the surface (wall)
normal. When camera is at 22.5 ∘ to the normal, the characters are too slanted
to be seen clearly. Therefore, we choose 45 ∘ as the maximum visible angle
range.

We solved the problem on a desktop computer with Intel i7 6-core 2.60GHZ CPU,
NVidia Geforce GTX 1650Ti GPU, and 64GB ram. We used a RICOH Theta Z1 360∘
camera to shoot the panoramas. We model the indoor environment according to
the public area (e.g., corridors) of the floor plan of our department (see
Figure 2). To empirically find the maximal visible range and the maximal angle
(w.r.t. the surface normal) of the camera, we put a paper with printed texts
on a wall and shoot numerous panoramas at different distances and angles. The
shoot panoramas are shown in figure 3. We found the camera can barely capture
characters of font size 118 points printed on a A4 paper at 5.04 meters away
and at an angle of 45 degrees. For the minimal range, we find that the camera
cannot get closer than 0.61 meters to a wall because the tripod needs space.

###  4.1 Optimization results

As mentioned previously, we computed three kinds of results: 1) no maximal
range nor angle constraints, 2) with maximal range constraint (5.04 meters),
and 3) with both maximal range constraint and angle constraint (45 degrees).
The results are shown in Figure Optimizing Placements of 360∘ Panoramic
Cameras in Indoor Environments by Integer Programming. As expected, the
optimal solutions have more 360∘ camera placements when more constraints are
imposed. To show how the cameras together entirely capture the indoor
environment, in Figure 5, we show the coverage areas of the three cameras in
the "no-constraint" solution (Figure Optimizing Placements of 360∘ Panoramic
Cameras in Indoor Environments by Integer Programming (a)).

We now discuss statistics about the IP problem formulation. For the boundary
polygon, we densely sampled 1056 boundary points and 19248 interior points.
The sampling is shown in Figure 4. This means that the visibility matrix (as
used in [GCW15] to describe problem sizes) has about 20.326 million entries,
which is bigger than the problems in [GCW15]. However, the matrix size alone
is not enough to present the sizes of the optimization problems as many pairs
of boundary and interior points are mutually invisible to each other.
Therefore, we calculate a proxy to the optimization problem sizes as follows.
For each boundary point, we count the number of interior points that cover it.
We then sum up the counts. The numbers are reported in Table 1 first row. Note
that the more constraints, the smaller the problem sizes.

For timing statistics, all the three optimization problems are solved within
one second by Gurobi (see Table 1 second row). However, we used a Python-based
implementation [Sie18] of the circular ray sweeping-based algorithm to
enumerate visible interior points of a boundary point. For our problem, it
took about 26.5 seconds in total to find the boundary points covering every
interior points. We expect changing to a C++ implementation with multi-
threading should significantly reduce the time.

Figure 4:  The sampled boundary and interior points. We also show the set of interior points that cover a boundary point as the ones within the 90-degree quadrant. Figure 5:  Coverages of the three 360∘ cameras that together completely cover the whole indoor environment in the non-constrained problem. |  | Fig. Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments by Integer Programming (a)
---
| Fig. Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments
by Integer Programming (b)
---
| Fig. Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments
by Integer Programming (c)
---
Visibility pairs: | 1229768 | 854113 | 295532
Solutions: | 3 | 18 | 39
Opt. time: (sec) | 0.6 | 0.33 | 0.076
Table 1: Statistics for the three computed solutions in Figure Optimizing
Placements of 360∘ Panoramic Cameras in Indoor Environments by Integer
Programming.

###  4.2 User studies

We asked several students and one professional architect to solve the same
problems without constraints and with maximal range and angle threshold of the
cameras. The results are shown in Figure 6 and Figure 7 and reported in Table
2. In short, we find that human users actually have good intuitions on placing
360∘ cameras - when there is no constraints on the ranges nor the angles.
However, when range or angle constraints are imposed (Which are necessary in
real-world scenarios), humans can no longer give good guesses. The users all
took quite some time to decide the solutions. Worse, for the constrained
problem, most of the human solutions are actually wrong as some parts of the
indoor environments are not covered by the cameras. The architect gave an
interesting (but not optimal) solution for the first problem only.

Figure 6:  Human solutions for the non-constrained problem (Figure Optimizing Placements of 360∘ Panoramic Cameras in Indoor Environments by Integer Programming (a)). User |  | No constraints
---
| Time (sec)
---
A | 5 | 75
B | 8 | 30
C | 4 | 300
D | 4 | 20
Architect | 19 | 60
|  | W/ dist. and angle constraints
---
A | 9 | 55
B | 20 | 79
C | 12 | 242
D | 22 | 286
Table 2: The numbers of placed cameras (middle column) and times taken by
human users. Figure 7:  Human solutions for the distance and angle-constrained
problem (Figure Optimizing Placements of 360∘ Panoramic Cameras in Indoor
Environments by Integer Programming (c)). In second left, we mark parts of the
indoor environment that are missed by the placed cameras.

##  5 Conclusion

In this paper, we leverage modern visibility computation methods in computer
graphics, which is critical for the correctness and efficiency of rendering,
to solve the problem of placing 360∘ cameras to capture indoor environments in
the architecture, engineering, and construction (AEC) industries. We use the
circular ray sweeping-based algorithm [Asa85] to enumerate visible interior
points of a boundary point, and formulate the set covering problem as a simple
integer-programming (IP) problem that can be readily solved by modern solvers
such as Gurobi. With our approaches, globally optimal solutions can be
computed very efficiently, making our method suitable for interactive tools.

Our method can only be considered as a first step toward professional
solutions for the AEC industries. Therefore, for future work, we aim to expand
our methods to accommodate more realistic 3D models of the indoor environments
and the 360∘ cameras (for examples, true 3D models instead of approximated
2.5D models) so that cluttered environments can be modeled adequately. We also
want to incorporate more real-world issues about 360∘ photography, such as
planning the paths of moving the camera/tripod, and deviations of the camera
heights, into our computational model.

##  6 Acknowledgements

This work is funded by the Ministry of Science and Technology of Taiwan
(110N007 and 111R10286C).

## References

  * [AMP10] YOAV AMIT, JOSEPH S.. MITCHELL and ELI PACKER  “LOCATING GUARDS FOR VISIBILITY COVERAGE OF POLYGONS”  In _International Journal of Computational Geometry & Applications_ 20.05, 2010, pp. 601–630  DOI: 10.1142/S0218195910003451
  * [Asa85] Tetsuo Asano  “An efficient algorithm for finding the visibility polygon for a polygonal region with holes”  In _IEICE TRANSACTIONS (1976-1990)_ 68.9 The Institute of Electronics, InformationCommunication Engineers, 1985, pp. 557–559
  * [BHH*14] Francisc Bungiu et al.  “Efficient computation of visibility polygons”  In _Arxiv_ , 2014
  * [BL11] Andrea Bottino and Aldo Laurentini  “A nearly optimal algorithm for covering the interior of an Art Gallery”  In _Pattern Recognition_ 44.5, 2011, pp. 1048–1056  DOI: https://doi.org/10.1016/j.patcog.2010.11.010
  * [BW03] Jiri Bittner and Peter Wonka  “Visibility in Computer Graphics”  In _JOURNAL OF ENVIRONMENTAL PLANNING_ 30, 2003, pp. 729–756
  * [CCSD03] D. Cohen-Or, Y.L. Chrysanthou, C.T. Silva and F. Durand  “A survey of visibility for walkthrough applications”  In _IEEE Transactions on Visualization and Computer Graphics_ 9.3, 2003, pp. 412–431  DOI: 10.1109/TVCG.2003.1207447
  * [CdRdS11] Marcelo C. Couto, Pedro J. Rezende and Cid C. Souza  “An exact algorithm for minimizing vertex guards on art galleries”  In _International Transactions in Operational Research_ 18.4, 2011, pp. 425–448  DOI: https://doi.org/10.1111/j.1475-3995.2011.00804.x
  * [CHL*21] Steve Cruz et al.  “Zillow Indoor Dataset: Annotated Floor Plans With 360º Panoramas and 3D Room Layouts”  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2021, pp. 2133–2143
  * [DDP96] Frédo Durand, George Drettakis and Claude Puech  “The 3D visibility complex: a new approach to the problems of accurate visibility”  In _Eurographics Workshop on Rendering Techniques_ , 1996, pp. 245–256  Springer
  * [DG05] Frédéric Delbos and Jean Charles Gilbert  “Global Linear Convergence of an Augmented Lagrangian Algorithm to Solve Convex Quadratic Optimization Problems”  In _Journal of Convex Analysis_ 12, 2005, pp. 45–69
  * [DOL06] Enrique Dunn, Gustavo Olague and Evelyne Lutton  “Parisian camera placement for vision metrology” Evolutionary Computer Vision and Image Understanding  In _Pattern Recognition Letters_ 27.11, 2006, pp. 1209–1219
  * [ES04] Ugur Murat Erdem and Stan Sclaroff  “Optimal placement of cameras in floorplans to satisfy task requirements and cost constraints”  In _OMNIVIS workshop_ 4, 2004
  * [ES06] Uğur Murat Erdem and Stan Sclaroff  “Automated camera layout to satisfy task-specific and floor plan-specific coverage requirements” Special issue on Omnidirectional Vision and Camera Networks  In _Computer Vision and Image Understanding_ 103.3, 2006, pp. 156–169
  * [GCW15] Bernard Ghanem, Yuanhao Cao and Peter Wonka  “Designing camera networks by convex quadratic programming”  In _Computer Graphics Forum_ 34.2, 2015, pp. 69–80  Wiley Online Library
  * [GGS*09] Jose-Joel Gonzalez-Barbosa et al.  “Optimal camera placement for total coverage”  In _2009 IEEE International Conference on Robotics and Automation_ , 2009, pp. 844–848  DOI: 10.1109/ROBOT.2009.5152761
  * [Gho10] Subir Kumar Ghosh  “Approximation algorithms for art gallery problems in polygons”  In _Discrete Applied Mathematics_ 158.6, 2010, pp. 718–722
  * [Gur22] Gurobi Optimization, LLC  “Gurobi Optimizer Reference Manual”, 2022  URL: https://www.gurobi.com
  * [GXZY09] Bo Gao, Demin Xu, Fubin Zhang and Yao Yao  “Constructing visibility graph and planning optimal path for inspection of 2D workspace”  In _2009 IEEE International Conference on Intelligent Computing and Intelligent Systems_ 1, 2009, pp. 693–698  IEEE
  * [HL06] Eva Hörster and Rainer Lienhart  “On the optimal placement of multiple visual sensors”  In _Proceedings of the 4th ACM international workshop on Video surveillance and sensor networks_ , 2006, pp. 111–120
  * [JCJL17] Sungbum Jun, Tai-Woo Chang, Hanil Jeong and Seokcheon Lee  “Camera Placement in Smart Cities for Maximizing Weighted Coverage With Budget Limit”  In _IEEE Sensors Journal_ 17.23, 2017, pp. 7694–7703  DOI: 10.1109/JSEN.2017.2723481
  * [Mat17] Matterport  “Guide: Matterport for Construction Documentation”, 2017  URL: https://matterport.com/resources/content-library/matterport-construction-documentation
  * [Mat22] Matterport  “3D Scanning for Insurance and Restoration”, 2022  URL: https://matterport.com/industries/insurance-restoration
  * [MC13] Aaron Mavrinac and Xiang Chen  “Modeling Coverage in Camera Networks: A Survey”  In _Int. J. Comput. Vision_ 101.1 USA: Kluwer Academic Publishers, 2013, pp. 205–226  DOI: 10.1007/s11263-012-0587-7
  * [MWY*17] Ali Motamedi et al.  “Signage visibility analysis and optimization system using BIM-enabled virtual reality (VR) environments”  In _Advanced Engineering Informatics_ 32 Elsevier, 2017, pp. 248–262
  * [Ope22] OpenSpace  “The 5-Minute Guide to Construction Photo Documentation”, 2022  URL: https://www.openspace.ai/resources/ebooks/the-5-minute-guide-to-construction-photo-documentation
  * [ORo87] Joseph O’Rourke  “Art Gallery Theorems and Algorithms”  Oxford University Press, 1987
  * [Pat20] Amit Patel  “2d Visibility”, 2020  URL: https://www.redblobgames.com/articles/visibility/
  * [Pha21] Daniel Pharaoh  “How to Create a Virtual Tour with Any 360 Camera – Full Guide”, 2021  URL: https://www.threesixtycameras.com/how-to-create-a-virtual-tour-with-any-360-camera-2020-guide/#shooting
  * [RRA*06] Siva Ram et al.  “A Design Methodology for Selection and Placement of Sensors in Multimedia Surveillance Systems”  In _Proceedings of the 4th ACM International Workshop on Video Surveillance and Sensor Networks_ , VSSN ’06  New York, NY, USA: Association for Computing Machinery, 2006, pp. 121–130  DOI: 10.1145/1178782.1178801
  * [Sie18] Maic Siemering  “2d visibility in python”, 2018  URL: https://gist.github.com/eruvanos/d47eab892ac0967ba623ea1578a05fa7
  * [SKR09] G…. Sivaram, Mohan S. Kankanhalli and K.. Ramakrishnan  “Design of Multimedia Surveillance Systems”  In _ACM Trans. Multimedia Comput. Commun. Appl._ 5.3 New York, NY, USA: Association for Computing Machinery, 2009  DOI: 10.1145/1556134.1556140
  * [TRS16] Davi C. Tozoni, Pedro J. Rezende and Cid C. Souza  “Algorithm 966: A Practical Iterative Algorithm for the Art Gallery Problem Using Integer Linear Programming”  In _ACM Trans. Math. Softw._ 43.2 New York, NY, USA: Association for Computing Machinery, 2016  DOI: 10.1145/2890491
  * [vdHHW*09] Anton Hengel et al.  “Automatic camera placement for large scale surveillance networks”  In _2009 Workshop on Applications of Computer Vision (WACV)_ , 2009, pp. 1–6  DOI: 10.1109/WACV.2009.5403076
  * [Wan11] Bang Wang  “Coverage Problems in Sensor Networks: A Survey”  In _ACM Comput. Surv._ 43.4 New York, NY, USA: Association for Computing Machinery, 2011  DOI: 10.1145/1978802.1978811
  * [YCA*08] Yi Yao et al.  “Sensor planning for automated and persistent object tracking with multiple cameras”  In _2008 IEEE Conference on Computer Vision and Pattern Recognition_ , 2008, pp. 1–8  DOI: 10.1109/CVPR.2008.4587515


# Spectroscopic analysis of BPS CS 22940$-$0009: connecting evolved helium
stars

E. J. Snowdon,1 L. J. A. Scott,1 C. S. Jeffery,1 and V. M. Woolf,2
1Armagh Observatory and Planetarium, College Hill, Armagh, BT61 9DB, UK
2Physics Department, University of Nebraska at Omaha, 6001 Dodge St, Omaha,
NE, 68182, USA E-mail<EMAIL_ADDRESS>
(Accepted XXX. Received YYY; in original form ZZZ)

###### Abstract

BPS CS 22940$-$0009 is a helium-rich B-star that shares characteristics with
both helium-rich B subdwarfs and extreme helium stars. The optical spectrum of
BPS CS 22940$-$0009 has been analysed from SALT observations. The atmospheric
parameters were found to be $T_{\rm eff}=34\,970\pm 370$ K, $\log g/{\rm
cm\,s^{-2}}=4.79\pm 0.17$, $n_{\rm H}/n_{\rm He}\simeq 0.007$, $n_{\rm
C}/n_{\rm He}\simeq 0.007$, $n_{\rm N}/n_{\rm He}\simeq 0.002$, although
further improvement to the helium line fits would be desirable. This places
the star as a link between the He-sdB and EHe populations in $g$-$T$ space.
The abundance profile shows enrichment of N from CNO-processing, and C from
$3\alpha$ burning. Depletion of Al, Si, S and a low upper limit for Fe show
the star to be intrinsically metal-poor. The results are consistent with BPS
CS 22940$-$0009 having formed from the merger of two helium white dwarfs and
currently evolving toward the helium main sequence.

###### keywords:

stars: abundances – stars: chemically peculiar – stars: early-type – stars:
individual: BPS CS 22940$-$0009 – subdwarfs

††pubyear: 2015††pagerange: Spectroscopic analysis of BPS CS 22940$-$0009:
connecting evolved helium stars–C

##  1 Introduction

Hot subdwarf B (sdB) stars occupy the blue end of the horizontal branch and
can be found in both the field and in globular clusters. They have colours
typical of B stars and effective temperatures and surface gravities similar to
helium (He) main sequence stars of about 0.5 solar masses. Like other
horizontal branch stars, they have helium-burning cores, but their hydrogen
(H) envelopes are much thinner and cannot sustain shell burning. The spectra
of sdBs are typically helium-deficient and show strong Balmer lines. It is
thought that gravitational settling and radiative levitation sink the
atmospheric helium below the hydrogen surface (Heber, 1986b). However, about
4% of sdBs display very helium-rich atmospheres characterised by strong
neutral He lines (Green et al., 1986), with similar temperatures but lower
surface gravities than their H-rich counterparts. Many of these helium-rich
sdB stars (He-sdBs) also have strong lines of nitrogen (N ii and N iii) and in
some cases, carbon (C ii and C iii) (Naslim et al., 2010).

Extreme helium (EHe) stars are a rare class of peculiar supergiants with
effective temperatures of 8 000-32 000 K (Drilling et al., 1984). EHe spectra
are characterised by strong lines of neutral He and singly-ionised C, with the
Balmer lines being very weak or absent (Hunger, 1975). An overabundance of
nitrogen in most EHe stars and a very high carbon abundance in all implies the
presence of both H-processed and He-processed material at the surface (Heber,
1983; Jeffery, 1996). Two principal evolutionary models emerged. In the
‘double degenerate’ model (Webbink, 1984; Iben & Tutukov, 1984; Saio &
Jeffery, 2002), a He white dwarf merges with a more massive C-O white dwarf
companion. If the mass of the C-O component remains below the Chandrasekhar
limit, the base of the accreted envelope ignites causing the envelope to
expand. As the resulting H-deficient supergiant contracts, it will cool to
become an EHe star and eventually a white dwarf. In the ‘final flash’ model
(Iben et al., 1983) a late ignition in the helium shell of a post-AGB star
causes the outer layers to rapidly expand. Hydrogen in the envelope is
consumed by burning and the resulting H-deficient supergiant contracts to
become an EHe star.

He-sdBs pose several questions in regards to their origins, evolution, and
connection to similar populations. For example, how are they formed and what
causes them to be so He-rich? Why are some stars abundant in C and/or N but
not others? Do He-sdBs form a sequence with normal sdBs or with the He-rich O
subdwarfs? Are there any links with other types of helium-rich stars such as R
Coronae Borealis variables or helium white dwarfs (Jeffery, 2008)? To answer
these questions, observing campaigns by (for example) Naslim et al. (2010);
Jeffery et al. (2021) have focused on identifying helium-rich objects from
surveys of faint blue stars, and systematically obtaining atmospheric
parameters and chemical abundances from their spectra. This builds on earlier
efforts to determine the physical parameters of He-sdBs using optical
spectroscopy (e.g. Ahmad & Jeffery, 2003, 2004). By collecting this
information, it becomes possible to search for patterns within the He-sdB
class and to identify possible connections with other classes of evolved
stars.

Several scenarios have been postulated to explain the evolution of helium
subdwarfs. Brown et al. (2001) proposed that a star undergoing a late helium-
core flash while descending the white dwarf cooling curve could produce
enhanced He and C abundances via flash mixing. Lanz et al. (2004) showed how
flash mixing can be ‘deep’ or ‘shallow’, depending on how deeply the hydrogen
envelope is mixed into the site of the flash. Both kinds produce He-rich
surfaces with enhanced C and N, but shallow mixing also leaves a significant
remaining hydrogen fraction. These scenarios were expanded upon by Miller
Bertolami et al. (2008) who used 1D numerical simulations to study the effects
of non-standard assumptions such as chemical gradients on hot-flasher mixing.
Other authors have suggested that the coalescence of two helium white dwarfs
(mergers) can account for both conventional and helium-rich subdwarfs. Saio &
Jeffery (2000) attempted to model such a merger by computing the consequences
of rapid accretion of He-rich matter onto a helium white dwarf; this accretion
results in off-centre helium ignition and causes the star to first expand,
then contract through repeating helium-shell flashes. The resulting stellar
surface is abundant in He and N, but shows no C enrichment. Zhang & Jeffery
(2011) simulated similar double helium white dwarf merger models assuming
three combinations of rapid and slow accretion. They found that slow accretion
allows the N-rich material of the accreted white dwarf to form the surface of
the product without mixing. Fast accretion leads to convection zones that
dredge up C-rich material to the surface. A combination of rapid (dynamical)
followed by slow (thermal) accretion yields final abundances that depend on
the mass of the merger, with high-mass systems producing deeper convective
dredge-up after the first helium shell flash. Thus low-mass systems are
expected to be N-rich, whilst high-mass systems are both N-rich and C-rich.

BPS CS 22940$-$0009 (EC 20262$-$6000) is a hot, He-rich star (Beers et al.,
1992) that is part of a distinct sequence of rare, H-poor stars with strong N
lines. Similar objects include LS IV+6°2 (Jeffery, 1998) and PG 1415+492
(Drilling et al., 2013). These stars are typified by luminosity classes of V
or less, and surface gravities similar to those of main sequence B stars. BPS
CS 22940$-$0009 was studied together with other N-rich He-sdBs by Naslim et
al. (2010) and found to be the most C-rich member of the sample. Our goal for
this work is to re-examine BPS CS 22940$-$0009 using more recent spectra with
improved signal-noise ratios in order to assess its relation to other He-sdB
and EHe stars, and if it represents a connection between these classes.
Additionally, we also aim to investigate the chemical profile of this star to
search for any peculiarities. These could provide further clues to the
evolution of this star and others like it.

In this paper, we present a spectroscopic analysis of BPS CS 22940$-$0009\.
Section 2 describes the observations used for this paper. In section 3 we
obtain the atmospheric parameters by fitting optical spectra to a grid of
model atmospheres in local thermodynamic equilibrium (LTE), and calculate
chemical abundances by measuring the equivalent widths of key spectral lines.
We also use TESS photometry and cross-correlation of the HRS spectra to search
for variability in flux and radial velocity. Section 4 discusses our abundance
and parameter results and compares them to similar He-sdB and EHe stars. The
implications of our results on the evolutionary status of BPS CS 22940$-$0009
are given in section 5. The potential impact of the LTE approximation is
considered in Section 4.3.

##  2 Observations

Instrument/ |  $R$/ | $t_{\rm exp}$ | S/N | Sampling |
---|---|---|---|---|---
Date | UT start | (s) |  | (Å/pix.) |
AAT/UCLES | 32 000 |  |  |  |
2005 08 26 | 09:25:40 | 1800 | 10 | 0.06 |
| 09:56:33 | 1800 | 10 | 0.06 |
| 10:27:29 | 1800 | 12 | 0.06 |
| 10:58:22 | 1800 | 10 | 0.06 |
ESO/FEROS | 48 000 |  |  |  |
2011 05 08 | 06:37:42 | 1800 | 20 | 0.6 |
| 07:08:35 | 1800 | 20 | 0.6 |
SALT/RSS | 2250 |  |  |  |
2018 05 05 | 01:59:14 | 100 | 73 | 1.1 |
| 02:01:15 | 100 | 73 | 1.1 |
| 02:08:25 | 150 | 73 | 1.1 |
| 02:11:16 | 150 | 73 | 1.1 |
SALT/HRS | 43 000 |  |  |  |
2016 06 23 | 02:49:43 | 1050 | 19 | 0.03 |
| 03:08:24 | 1050 | 19 | 0.03 |
2016 06 30 | 02:35:32 | 1250 | 20 | 0.03 |
| 02:57:33 | 1250 | 20 | 0.03 |
2018 05 07 | 01:00:12 | 900 | 16 | 0.03 |
| 01:16:26 | 900 | 16 | 0.03 |
2019 04 25 | 01:42:05 | 1450 | 38 | 0.03 |
| 02:07:25 | 1450 | 38 | 0.03 |
Table 1: Record of observations of BPS CS 22940$-$0009\. The sampling of the
reduced spectrum is given as an average in Å/pixel over the full spectrum.

BPS CS 22940$-$0009 was selected for analysis due to its unique position as a
bridge between stellar classes. This star was previously studied by Naslim et
al. (2010), who found it to be the coolest and lowest-gravity member of their
sample. Additionally, a coarse analysis by Jeffery et al. (2021) placed the
star as the hottest and highest-gravity member of a group of helium-rich stars
that are not subdwarfs. With $\log g/{\rm cm\,s^{-2}}\approx 5$, it lies below
the hydrogen main sequence ($\log g/{\rm cm\,s^{-2}}\approx 4$ for B stars).
This makes BPS CS 22940$-$0009 a potentially interesting edge case among the
He-sdB population, bridging the gap between more conventional hot subdwarfs
and hot extreme helium stars. In recent years, further observations of BPS CS
22940$-$0009 have made it possible to improve the accuracy of parameter and
abundance measurements by increasing both resolution and signal-noise ratio.

Observations of BPS CS 22940$-$0009 were made at the Southern African Large
Telescope (SALT). Detailed optical spectra were obtained using the High
Resolution Spectrograph (HRS: $R\simeq 43\,000,\,\lambda\lambda=4100-5200$ Å)
which is an échelle format spectrograph. Since broad-lines frequently span
more than one échelle order, targets are also observed with the lower-
resolution Robert Stobie Spectrograph (RSS: $R\simeq
2000,\,\lambda\lambda=3850-5150$ Å) in order to guide the correction of the
échelle blaze function.

The HRS spectra for this analysis were obtained on the night of 24-25 April
2019 and consisted of 4x1450 second exposures; 2 red and 2 blue. The RSS
observations were performed on the night of 4-5 May 2018 and consisted of
2x100 second and 2x150 second exposures. We used the PG2300 grating and a slit
width 1.5Å to obtain a full-width half-maximum resolution $R$ between 1800 at
4000Å and 2300 at 5000Å (as measured from the CuAr calibration lamp),
corresponding to $\Delta\lambda\approx 2.2$Å throughout. The RSS detector
subsystem comprises 3 CCD chips separated by 2 gaps, so double exposures are
taken from 2 different grating angles and merged to produce a continuous
spectrum. The data reduction process for the RSS spectra is described by
Jeffery et al. (2021). The HRS data were reduced using standard iraf routines
to subtract the bias signal, divide stellar spectra by combined flat field
spectra, correct pixels affected by cosmic rays, reduce to one dimensional
spectra, and apply the wavelength scale using thorium-argon lamp spectra.
Spectra from previous observations were also used to search for variability in
radial velocity over time. The full list of available observations is given in
Table 1. A combined spectrum was produced from a S/N-weighted average of all
available HRS observations. This offered the highest-available signal-noise
ratio (S/N = 52), but did not produce a significantly better fit to
interpolated grid models than the 2019 spectrum alone ($\chi^{2}_{\rm
all}/\chi^{2}_{2019}=0.89$). Furthermore, including the 2016 and 2018
observations introduced noise in the échelle overlap regions of the combined
spectrum. As a result, only the 2019 spectrum was used for the majority of the
analysis.

##  3 Atmospheric Analysis

The atmospheric parameters effective temperature ($T_{\rm{eff}}$), surface
gravity ($g$), and fractional helium abundance by number ($n_{\rm{He}}$) were
determined simultaneously using the software package sfit (Jeffery et al.,
2001), which finds the best match to the observed spectrum in a grid of
theoretical spectra. Chemical abundances were calculated from the equivalent
widths of absorption lines in the HRS spectrum.

###  3.1 Model atmospheres

Grids of model atmosphere structures were constructed using the model
atmosphere code sterne (Behara & Jeffery, 2006). The models assume local
thermodynamic equilibrium, hydrostatic equilibrium, and use plane-parallel
geometry. Grids of high-resolution synthetic spectra were computed therefrom
using the LTE formal solution code spectrum (Jeffery et al., 2001). Subgrids
were created by resampling the master grid onto a wavelength interval of 1.1
Å. This grid would be used for fitting the RSS spectrum. Both grids covered a
parameter space of $T_{\rm eff}$/K = 28 000 (2 000) 40 000, log $g$/cm s-2 =
4.0 (0.25) 5.5 and $n_{\rm He}=0.95,0.99,1.0$.

Figure 1: Comparison of the renormalised RSS spectrum (black) and a model
spectrum (red), which has $T_{\rm eff}$ = 34 970 K, log $g$ = 4.79, $n_{\rm
He}$ = 0.978. Designated continuum regions used for renormalisation in the
fitting process are shown in blue. The residual flux (observed – model) is
shown beneath.

###  3.2 Atmospheric parameters

sfit interpolates in a grid of model spectra using a set of initial guesses
for the atmospheric parameters $T_{\rm{eff}}$, $g$ and $n_{\rm{He}}$. The
interpolated spectrum is compared with the observed spectrum by evaluating the
$\chi^{2}$ statistic. A best-fit solution is found using a Levenburg-Marquardt
algorithm to iterate the guess parameters until $\chi^{2}$ is minimised (Press
et al., 1989). The atmospheric parameters were first measured for the RSS
spectrum. Reference regions relatively free of absorption lines and
distributed across the full wavelength range (4100-5100 Å) were defined
manually. A reference spectrum was defined using initial parameter estimates
$T_{\rm eff}=34\,000$ K, $\log g/{\rm cm\,s^{-2}}=4.5$, $n_{\rm He}=0.99$. The
reference regions were used with a high-pass filter having FWHM 200 Å to
renormalise the observed spectrum to the reference spectrum. sfit then solved
for $T_{\rm eff}$, $\log g$, and $n_{\rm He}$ individually, assuming an
instrumental broadening of 1 Å. $T_{\rm eff}$ was measured by fitting the
temperature-sensitive He ii 4686 Å line. $\log g$ was measured from the
gravity-sensitive He i 4388, 4471, and 4921 Å lines. The cores of these lines
were excluded from the fit as they are not well-reproduced by the LTE model.
$n_{\rm He}$ was obtained by fitting the whole spectrum; sfit calculates the
hydrogen abundance of the fit, and then reports $n_{\rm He}=1-n_{\rm H}$.

The parameter results were found to be $T_{\rm eff}=34\,970\pm 370$ K, $\log
g/{\rm cm\,s^{-2}}=4.79\pm 0.17$, $n_{\rm He}=0.978\pm 0.006$ (by number) from
the RSS spectrum and $T_{\rm eff}=34\,420\pm{240}$ K, $\log g/{\rm
cm\,s^{-2}}=4.66\pm 0.10$, $n_{\rm He}=0.974\pm 0.006$ from HRS (Table 2).
Errors are the formal sfit errors obtained by solving for each parameters
individually, with the others held constant. The small error on $n_{\rm He}$
arises because this is essentially a measurement of $1-n_{\rm H}$ which is
tightly constrained by the Balmer lines. A comparison of the normalised RSS
spectrum and a model spectrum created with these parameters is shown in Fig.
1. The model atmosphere having parameters closest to those of the best-fitting
RSS spectrum was then used to measure $v_{\rm t}$, and $v{\rm sin}\,i$ from
the HRS spectrum (§ 3.3), and the stellar radius, mass, and luminosity from
the TESS spectral energy distribution (§ 3.7).

| SALT/RSS | SALT/HRS | Naslim 2010 | Jeffery 2020
---|---|---|---|---
$T_{\rm eff}$ (K) | $34\,970\pm 370$ | $34\,420\pm 240$ | 33 700 $\pm$ 800 | 34 650 $\pm$ 110
log $g$ (cm s-2) | $4.79\pm 0.17$ | $4.66\pm 0.10$ | 4.7 $\pm$ 0.2 | 4.89 $\pm$ 0.04
$n_{\rm He}$ | 0.978 $\pm$ 0.006 | 0.974 $\pm$ 0.06 | 0.993 | 0.98 $\pm$ 0.01
$v_{\rm rad}$ (km s-1) | - | 32.7 $\pm$ 2.0 | – | 28 $\pm$ 3
$v_{\rm t}$ (km s-1) | - | 7.8 $\pm$ 0.2 | 10 | –
$v$sin$i$ (km s-1) | - | 15.0 $\pm$ 3.3 | 4 $\pm$ 3 | –
Table 2: Atmospheric parameters for the spectrum of BPS CS 22940$-$0009
obtained using sfit. Results from (Naslim et al., 2010) and (Jeffery et al.,
2021) are shown for comparison.

###  3.3 Microturbulent velocity and chemical abundances

Using the above parameters, the model atmosphere corresponding to the best-fit
spectrum was selected from the grid. Using spectrum, predicted equivalent
widths ($W_{\lambda}$) were computed for all lines in the observed spectral
window. Lines predicted to have $W_{\lambda}\geq 5$ mÅ were identified from
this list; equivalent widths were then measured for all qualifying C, N, O,
Ne, Mg, Al, Si, and S lines observable in the HRS spectrum. A complete list of
all line measurements made for the abundance calculation is provided in
Appendix B.

For each line the part of the profile to be measured was defined manually (the
segment), along with a region of continuum on either side of the line. A
linear fit was computed from the continuum regions, and the equivalent width
was obtained by integrating the line segment under the continuum fit. A
parabola was fit to the line segment to provide the line wavelength. Errors
were derived from an estimate of the flux error in the continuum regions and
from the formal parabola fit.

For a given (assumed) microturbulent velocity ($v_{\rm t}$), spectrum may be
used to compute a predicted line equivalent width for a given chemical
abundance or, by Newton-Raphson iteration, the chemical abundance
corresponding to a measured equivalent width. Nitrogen lines were used to
determine $v_{\rm t}$ using the classical method of minimising the gradient of
abundances with respect to equivalent width (Gray, 1976). Abundances were
calculated for each of 36 N ii lines with assumed $v_{\rm t}$ between 0 and 10
km s-1. The abundance-equivalent width gradients ($\nabla\log\epsilon_{\rm
N}=d\log\epsilon_{\rm N}/dW_{\lambda}$) were determined by $\chi^{2}$
minimisation. Only lines giving abundances of $8.0\leq\log\epsilon_{\rm N}\leq
10.0$ were considered to avoid errors due to saturated, weak ($W_{\lambda}<5$
mÅ) or blended lines. A linear fit of the gradients gives
$\nabla\log\epsilon_{\rm N}=0$ for $v_{\rm t}=7.8\pm 0.2\,{\rm km\,s^{-1}}$
(Fig. 2, Table 2).

Adopting $v_{\rm t}=7.8$, chemical abundances were derived for all lines with
measured $W_{\lambda}\geq 5$ mÅ. Rejecting outliers, mean abundances were
derived for 8 species (C, N, O, Ne, Mg, Al, Si, and S: Table 3). Abundances
are given in the form $\log\epsilon_{i}=\log n_{i}+c$, where $c=11.5725$ and
$n_{i}$ are number fractions111Stellar abundances are conventionally given
such that for hydrogen $\log\epsilon_{\rm H}=12$, and for other species $i$ by
$\log\epsilon_{i}=\log n_{i}/n_{\rm H}$. This assumes a hydrogen-dominated
composition, which is not appropriate for helium-rich stars, like BPS CS
22940$-$0009, where a) the denominator may approach zero and b) number
fractions of conserved species change simply because 4 protons combine to form
a single helium nucleus. With atomic weights $a_{i}$, $c$ is computed such
that
$\log\Sigma_{i}a_{i}n_{i}+c=\log\Sigma_{i}a_{i}n_{i,\odot}+c_{\odot}=12.15$.
This conserves both $\log\epsilon_{i}$ and mass fraction for each species
whose abundance is otherwise unchanged (Jeffery et al., 2011).. The error in
the mean abundances was propagated quadratically from the errors in the
individual abundances in each line, and hence from the error in the equivalent
width measurements. Upper limits were obtained for P and Fe. Individual
species are discussed below.

Table 3: Chemical abundances for BPS CS 22940$-$0009\. Abundances are given in the form $\log\epsilon_{i}=\log n_{i}+c$ as defined in the text. $N$ is the number of lines used in the abundance calculation. Abundance errors for metals are propagated from the errors in the individual line measurements reported by spectrum. Errors for H and He are taken from the fractional error in $n_{\rm He}$ and $n_{\rm H}$. Results from Naslim et al. (2010) and photospheric solar values from Asplund et al. (2009) are included for comparison. These are normalised such that $\log\Sigma_{i}a_{i}n_{i}=12.15$. Species | $N$ | $\log\epsilon$ |  $\log\epsilon$ (Naslim) |  $\log\epsilon$ (Solar)
---|---|---|---|---
H | - | 9.91 $\pm$ 0.06 | 9.10 $\pm$ 0.20 | 12.00
He | - | 11.56 $\pm$ 0.01 | 11.54 | 10.93 $\pm$ 0.01
C | 45 | 9.43 $\pm$ 0.68 | 8.94 $\pm$ 0.35 | 8.43 $\pm$ 0.05
N | 69 | 8.85 $\pm$ 0.66 | 8.46 $\pm$ 0.22 | 7.83 $\pm$ 0.05
O | 9 | 7.31 $\pm$ 0.45 | 7.11 $\pm$ 0.34 | 8.69 $\pm$ 0.05
Ne | 15 | 7.93 $\pm$ 0.47 | 8.27 $\pm$ 0.45 | 7.93 $\pm$ 0.10
Mg | 3 | 7.81 $\pm$ 0.41 | 7.27 $\pm$ 0.18 | 7.60 $\pm$ 0.04
Al | 6 | 6.01 $\pm$ 0.67 | 6.12 $\pm$ 0.15 | 6.45 $\pm$ 0.03
Si | 5 | 6.98 $\pm$ 0.28 | 7.23 $\pm$ 0.24 | 7.51 $\pm$ 0.03
P | - |  $\leq$ 5.25 | - | 5.41 $\pm$ 0.03
S | 4 | 6.25 $\pm$ 0.43 | 6.45 $\pm$ 0.15 | 7.12 $\pm$ 0.03
Fe | - |  $\leq$ 6.30 | - | 7.50 $\pm$ 0.04
Figure 2: Gradient of nitrogen abundance as a function of equivalent width vs
assumed microturbulent velocity for 36 Nii lines. The red line is a linear fit
that crosses $\nabla\log\epsilon_{\rm N}=0$ at $v_{\rm t}=7.8\pm 0.2{\rm
km\,s^{-1}}$ with $\chi^{2}=1.12x10^{-6}$.

The abundances obtained by the equivalent width method were used in spectrum
to construct a formal solution for the whole spectrum. A comparison of the
synthetic spectrum and the re-normalised HRS spectrum is shown in Appendix A.

####  3.3.1 H and He

The spectrum of BPS CS 22940$-$0009 is dominated by very strong helium lines,
while the Balmer lines are comparatively weak and blended with weak He ii. The
LTE models do not fit the cores of these lines well; the LTE assumption is
discussed in Section 4.3, in which a comparable NLTE model shows
overpopulation of the lower levels of the He i line transitions, leading to
deeper line cores than the LTE case. The gravity-sensitive He i (and He ii)
lines have widths comparable with those of individual orders in the HRS
échelle. Moreover, blaze removal and order merging in the HRS data reduction
process remain imperfect. Consequently, the wings of broad lines in the HRS
spectrum may be unsuitable for measuring $T_{\rm eff}$, $\log g$ and $n_{\rm
He}$. The final He and H abundances were therefore obtained via $\chi^{2}$
minimisation using the RSS spectrum. Fractional abundances $n_{\rm H}=0.022\pm
0.003$ and $n_{\rm He}=0.978\pm 0.006$ yield $\log\epsilon_{\rm H}=9.40\pm
0.06$ and $\log\epsilon_{\rm He}=11.56\pm 0.01$ as defined above. The H
abundance was measured from the Hβ and Hγ lines as a check on the results from
sfit, giving $\log\epsilon_{\rm H}=9.44\pm 0.07$. The atmosphere is strongly
He-rich and H-poor, with $n_{\rm H}/n_{\rm He}\simeq 0.007$. This is typical
for He-sdB and EHe stars, though hydrogen is less depleted than in the similar
stars LS IV+6°2 (Jeffery, 1998) and BX Cir (Drilling et al., 1998).

####  3.3.2 C, N, and O

The spectrum contains a large number of carbon and nitrogen lines with a wide
range of strengths, including several that are blended with other lines and
many that are saturated. Taking the abundance as a simple mean of all line
measurements is not viable as blended lines skew the average abundance to a
higher apparent value. Instead, the modal abundance from all lines with
equivalent widths $\geq 5$ mÅ was taken as a starting point. All lines with a
measured abundance outside of one standard deviation from the mode were
excluded. The overall abundance was then taken to be the mean of the remaining
lines, with the error being propagated forward from the errors in each
abundance measurement reported by spectrum. For carbon, this resulted in an
abundance of $\log\epsilon_{\sc\rm C}=9.43\pm 0.68$, based on measurements of
45 lines. For nitrogen, the result was $\log\epsilon_{\sc\rm N}=8.85\pm 0.66$
based on 69 lines.

There is a broad feature overlapping the C II lines at $\sim$4618 Å. These
lines arise from the transition between electronic states which can both
autoionise to the ground state of C III. This discrete-to-continuum transition
produces the characteristic broad feature whose absorption cross section can
be fitted by a Fano profile (Fano, 1961), as in e.g. Yan & Seaton (1987).
There was no need to attempt to fit this feature in our case since the other
carbon lines were adequate for abundance measurement. There are also a number
of C II lines in the 4720 to 4760 Å region which appear in the modelled LTE
spectrum but are absent in the data. These lines are known to be sensitive to
NLTE effects and are partially in emission. Both features are well known in
the spectra of carbon-rich and hydrogen-deficient stars of appropriate
temperature and surface gravity (Klemola, 1961; Heber, 1986a; Leuenhagen et
al., 1994).

The spectrum lacks strong oxygen lines. The oxygen abundance was measured from
9 relatively distinct lines. These gave a mean abundance of
$\log\epsilon_{\sc\rm O}=7.31\pm 0.45$.

####  3.3.3 Other metals

The neon abundance was measured from 15 lines between 4219.74-4522.72 Å,
giving a mean result of $\log\epsilon_{\sc\rm Ne}=7.93\pm 0.47$. The only
magnesium feature in the spectrum is a blend of 3 lines at 4481 Å. The Mg
abundance from this blend had to be measured carefully, since it lies within
the wing of a broad He line which causes curvature in the pseudo-continuum.
The equivalent width measurement was repeated 3 times, keeping the designated
continuum as close to the line as possible. This gave a mean Mg abundance of
$\log\epsilon_{\sc\rm Mg}=7.81\pm 0.41$. Using this value in the model
reproduced the width of the line well, but the core was too shallow. However,
the Mg line is saturated, so increasing the abundance in the model caused the
wings to broaden and reduced the accuracy of the fit. This suggests a
supersolar Mg abundance, but without any other Mg features to measure this
cannot be determined conclusively.

The aluminium abundance was measured from 6 lines between 4149.90 and 4529.20
Å to be $\log\epsilon_{\sc\rm Al}=6.01\pm 0.67$. Similarly, the sulphur
abundance was found using lines at 4253.59, 4284.98, 4332.69, and 4361.53 Å to
be $\log\epsilon_{\sc\rm S}=6.25\pm 0.43$.

The spectrum contains both strong and weak silicon lines. The shapes of the
strong lines are not well-reproduced by the LTE model, so the abundance was
measured from weaker lines, specifically 4212.41 Å and the four lines between
4716-4830 Å. The mean Si abundance was found to be $\log\epsilon_{\sc\rm
Si}=6.98\pm 0.28$.

The iron and phosphorus abundances are important for determining the overall
metallicity, but neither species has lines with $W_{\lambda}\geq 5$ mÅ within
the 4100-5100 Å window. An upper limit on these abundances was established by
finding the minimum abundances at which the strongest lines in the window (Fe
iii 4164.73 Å and P iii 4222.20 Å) become detectable to a confidence level of
68% (Appendix C). These were found to be $\log\epsilon_{\sc\rm Fe}\leq 6.30$
for iron and $\log\epsilon_{\sc\rm P}\leq 5.35$ for phosphorus. The
S/N-weighted average spectrum from all available HRS observations was used to
measure the Fe upper limit as it provided an improved signal-noise ratio in
the region around Fe iii 4164.73 Å. P iii 4222.20 Å lay in a noisy échelle
overlap region and so the P upper limit was measured using only the 2019 HRS
spectrum.

Taking the Al, Si, and S abundances as a proxy of metallicity, BPS CS
22940$-$0009 is metal poor by $\simeq 0.6\pm 0.3$ dex on average compared to
solar values (Asplund et al., 2009). These measurements are $\simeq 0.2\pm
0.2$ dex lower on average than those from Naslim et al. (2010), with the
results being in agreement for most species. The noisier AAT/UCLES spectrum
makes it very difficult to measure the equivalent widths of the weak lines, so
the abundances were based on less sensitive saturated lines. The Mg blend is
also strongly affected by noise in the continuum and in the blue wing of He
4471.48 Å. This makes the equivalent width of the feature harder to measure in
the UCLES spectrum than in the HRS spectrum and may explain the difference in
Mg abundance results. Similarly, the weak Si lines are not easily measurable
in the UCLES spectrum, which may explain the significant differences in Si
abundance.

###  3.4 Rotational Broadening

The projected equatorial velocity ($v\sin i$) was assumed to be 0 km s-1 for
the RSS spectrum as this would not have a significant effect due to the low
resolution. For the HRS spectrum, sfit was used to measure $v\sin i$ by
fitting a formal solution to the spectrum in the region 4770–4830 Å with all
other parameters fixed to their values in the RSS solution. This region has a
high signal-noise ratio and contains metal lines (3 Si iii, 7 N ii, 1 C ii/N
ii blend) that are sensitive to $v\sin i$ broadening. This gave a result of
$v\sin i=15.0\pm 3.3\,{\rm km\,s^{-1}}$.

Figure 3: Flux distribution of the best-fit model atmosphere with $T_{\rm
eff}=34\,970$K normalised to broadband photometry of BPS CS 22940$-$009\. The
lower panel shows the residuals normalized to the individual measurement
error. Photometry is obtained from the following catalogues Onken et al.
(2019) ($u,v,r,i,z$), Henden et al. (2015) ($B,V$), Gaia Collaboration et al.
(2021) ($G_{\rm BP},G,G_{\rm RP}$), Abbott et al. (2018) ($Y$), McMahon et al.
(2013) ($J$), Skrutskie et al. (2006) ($H$), and Schlafly et al. (2019)
($W2$).

###  3.5 Spectral Energy Distribution

The stellar radius ($R$), mass ($M$) and luminosity ($L$) were obtained by
fitting the reddened spectral energy distribution (SED) of the best-fit model
atmosphere ($T_{\rm eff}$ / K = 34 970, $\log g/{\rm cm\,s^{-2}}=4.79$) to
observed visual and near-infrared photometry (Fig. 3), using the isis SED
fitting toolkit (Heber et al., 2018; Irrgang et al., 2021). The reddening was
calculated using the extinction law of Fitzpatrick et al. (2019) with
$E(44-55)=0.060\pm 0.015$. The fit then yielded an angular diameter
$\log\theta/{\rm rad}=-11.054\pm 0.008.$ (where $\theta=2R/d$). Using the Gaia
EDR3 parallax of $0.47\pm 0.04$ mas and subtracting a zero-point correction of
$-26\,{\rm\upmu as}$ (Lindegren et al., 2021), we obtain
$d=2.10^{+0.19}_{-0.16}$ kpc and thus $R=0.42\pm 0.04$ ${\rm R_{\odot}}$.
Using $R$ with $T_{\rm eff}=34\,970\pm 370$ K from the RSS spectrum, we obtain
$L=230^{+50}_{-40}\,{\rm L_{\odot}}$. Using $R$ with $\log g/{\rm
cm\,s^{-2}}=4.79\pm 0.17$, we obtain $M=0.39^{+0.08}_{-0.06}\,{\rm
M_{\odot}}$. To indicate the impact of systematic errors, the SED fit obtained
using the HRS parameters (Table 2) yields $L=210^{+50}_{-40}\,{\rm L_{\odot}}$
and $M=0.29^{+0.06}_{-0.05}\,{\rm M_{\odot}}$.

###  3.6 Radial velocity

Date | $v_{\rm rad}$ | $\delta v_{\rm rad}$
---|---|---
| (km s-1) | (km s-1)
2016 06 23 | 24.6 | 0.9
2016 06 30 | 22.8 | 1.7
2018 05 07 | 31.5 | 0.8
2019 04 25 | 32.7 | 2.0
Table 4: Heliocentric radial velocities from cross-correlation of each
available HRS observations of BPS CS 22940$-$0009 with the best-fit model
spectrum.

The radial velocity ($v_{\rm rad}$) was determined by cross-correlation of the
HRS spectrum and the best-fitting model spectrum. The peak of the cross-
correlation function provided a wavelength shift that was used to calculate
$v_{\rm rad}$ after applying a barycentric correction. The error in $v_{\rm
rad}$ was calculated by measuring $\chi^{2}$ between the model spectrum and
the observed spectrum across the range of wavelength shifts used for the
cross-correlation function. The $1\sigma$ error bar was taken to be where
$\Delta\chi^{2}=\chi^{2}-\chi^{2}_{\rm min}=1$.

Radial velocities were measured for all 4 available HRS observations of BPS CS
22940$-$0009, to investigate any possible variability. Table 4 shows a
distinct difference in $v_{\rm rad}$ between the 2016 and 2018/2019 spectra.
However, pre-2018 HRS observations have shown significant velocity errors
associated with the HRS calibration programme (Jeffery & Miszalski, 2019).
Therefore it is unclear whether there is real variability in the $v_{\rm rad}$
of BPS CS 22940$-$0009.

###  3.7 Photometry

Figure 4: TESS photometry of BPS CS 22940$-$0009 during Sectors 13 (top) and
27 (middle) expressed as differential flux relative to the mean, and as a
frequency amplitude spectrum (bottom). The Nyquist frequency ($\nu_{\rm N}$: 2
m cadence) is marked by a blue vertical bar. The red line shows the 4$\sigma$
level above which discrete frequencies might be considered real.

BPS CS 22940$-$0009 was observed in 2 m cadence in a 600-1000 nm bandpass with
the Transiting Exoplanet Survey Satellite (TESS) during Sectors 13 and 27
(Fig. 4). In relative flux units, the mean individual datum error is 2.9%. The
standard deviation of the data is 2.2% in a total of 17 546 observations. The
Fourier transform was investigated for periodic content (Fig. 4). For
frequencies ($\nu$) greater than 0.25 d-1 (periods less than 4 days) there is
no evidence for periodic variability with (semi-) amplitude $a>0.06\%$. Low-
frequency signal at $\nu<0.25\,{\rm d}^{-1}$ with $a\approx 0.1\%$ is likely
to be red noise.

##  4 Discussion

###  4.1 Atmospheric parameters

Figure 5: Comparison of the surface gravity (left) and He/H abundance ratio
(right) against effective temperature of BPS CS 22940$-$0009 (black) versus
He-rich sdB (blue) and extreme helium (red) stars. Blue squares indicate He-
sdBs with strong C lines in their spectra (He-sdBC). Blue triangles indicate
He-sdBs with weak or absent carbon. The positions of the comparable stars LS
IV +6°2 and BX Cir are indicated. Parameters for comparison stars taken from
Jeffery et al. (2021); Jeffery (2008). The Eddington limit for Thomson
scattering for H-deficient atmospheres is included in the left panel (Mihalas,
1978).

The full list of atmospheric and stellar parameters obtained for BPS CS
22940$-$0009 is given in Table 5. The star’s physical properties lie between
the helium-rich hot subdwarfs and the extreme helium stars in g-T space (Fig.
5). In terms of helium abundance, it lies close to the He-sdBs and is notably
less H-deficient than EHe stars of similar temperature, such as LS IV +6°2.
The star has a luminosity class of V (Jeffery et al., 2021), compared to true
hot subdwarfs which are of classes VI-VII (Drilling et al., 2013). It
therefore can be considered a particularly hot, high-gravity extreme helium
star, with the closest counterpart being LS IV +6°2 (Jeffery, 1998). If BPS CS
22940$-$0009 formed from a double helium white dwarf merger, then it is likely
to continue to evolve toward the helium main sequence and become a He-sdB
(Saio & Jeffery, 2000).

Property | Value | Error
---|---|---
$T_{\rm eff}$ (K) | 34 970 | 370
$\log g$ (cm s-2) | 4.79 | 0.17
$n_{\rm He}$ | 0.978 | 0.006
$p$ (mas) | 0.47 | 0.04
$d$ (kpc) | 2.10 | ${}^{+0.19}_{-0.16}$
$R/{\rm R_{\odot}}$ | 0.42 | ${\pm 0.04}$
$L/{\rm L_{\odot}}$ | 230 | ${}^{+50}_{-40}$
$M/{\rm M_{\odot}}$ (median) | 0.39 | ${}^{+0.08}_{-0.06}$
$v_{\rm rad}$ (km s-1) | 32.7 | 2.0
$v_{\rm t}$ (km s-1) | 7.8 | 0.2
$v\sin{i}$ (km s-1) | 15.0 | 3.3
Table 5: Atmospheric and stellar parameters of BPS CS 22940$-$0009.

###  4.2 Abundances

Figure 6: Comparison of the chemical abundances of BPS CS 22940$-$0009 (black
circles) against two helium-rich subdwarfs (blue triangles) (Naslim et al.,
2019) and five extreme helium stars (red diamonds) (Pandey & Lambert, 2011;
Jeffery, 1998; Pandey et al., 2006; Jeffery et al., 1999; Drilling et al.,
1998; Jeffery, 2017)). Downward arrows indicate upper limits. Solar abundances
taken from Asplund et al. (2009). Comparison stars were selected from objects
with comparable $T_{\rm eff}$ and $\log g$ to BPS CS 22940$-$0009 and
available abundances of the same species measurable from the HRS spectrum.

The CNO profile of BPS CS 22940$-$0009 resembles that of extreme helium stars
such as BX Cir (Jeffery et al., 1999) and LS IV +6°2 (Jeffery, 1998). The
depletion of H and O coupled with the enhancement of He and N indicate that
the stellar material has been CNO-processed. The high C abundance also
suggests some triple-$\alpha$ processing. During the merger of two helium
white dwarfs, buried carbon-rich material can be dredged to the surface by
opacity-driven convection caused by He shell flashes (Zhang & Jeffery, 2011).

The abundances of Al, Si, and S are all significantly subsolar by $\sim
0.4-0.9$ dex, while the upper limit for Fe is subsolar by $\sim 0.8$ dex. The
Ne abundance is approximately solar, which is low compared to other extreme
helium stars which also show enhanced carbon (e.g. LS IV$+6^{\circ}2$ and LS
IV$-14^{\circ}109$: Fig. 6). The ratio of Ne to light elements Al, Si, and S
is in line with measurements for C-weak helium stars and subdwarfs (e.g. GALEX
J175548.5+501210 (J1755+5012), Ton 414, V652 Her and GALEX J184559.8$-$413827
(J1846$-$4138): Fig. 6). This suggests that the Ne abundance has not been
significantly enhanced, for example by $\alpha$-captures on 14N at the time
the excess carbon was produced.

The low metallicity could alternatively be caused by diffusion and
stratification of these elements. For stratification to be significant, the
star must be long-lived during its current evolution stage with respect to
diffusion timescales ($\sim 10^{5}$ yr). This means the star must lie on the
helium main sequence or the extended horizontal branch and so must have
subdwarf-like surface gravity, which BPS CS 22940$-$0009 does not. Convection
currents from He flashes would also disrupt the effects of any diffusion that
existed prior to the flash (Byrne et al., 2018). Therefore if the star is
currently evolving towards the helium main sequence, the low metallicity is
likely to be intrinsic and not caused by diffusion.

###  4.3 Effects of the local thermodynamic equilibrium approximation

Figure 7: Temperature against monochromatic optical depth for sterne and
tlusty models having $T_{\rm eff}=34\,000$ K, $\log g/{\rm{cm\,s^{-2}}}=4.75$,
$n_{\rm{He}}=0.99$, and $v_{\rm t}=5{\rm km\,s^{-1}}$.

.

For reasons of familiarity with the model atmosphere codes sterne and
spectrum, our analysis of BPS CS 22940-0009 has assumed the approximation of
local thermodynamic equilibrium (LTE) for the determination of electron-level
populations used in the equation of state and opacity calculation. For stars
with low surface gravities (or densities) or high effective temperatures, this
approximation becomes less secure as the local radiation field increasingly
perturbs the population distribution. The boundary beyond which the LTE
approximation is deemed inappropriate has been discussed severally (Anderson &
Grigsby, 1991; Grigsby et al., 1992; Nieva & Przybilla, 2007; Pereira, 2011).
For hot subdwarfs LTE appears satisfactory for $T_{\rm{eff}}<30\,000$ K and
may be useful up to $T_{\rm{eff}}<40\,000$ K (Rauch 2019, private
communication). Jeffery et al. (2021) found good agreement between effective
temperatures and surface gravities using grids of model atmospheres computed
with and without the LTE approximation up to $T_{\rm{eff}}<40\,000$ K. Rather,
the use or neglect of the correct line opacity has a far greater influence on
the result (Anderson & Grigsby, 1991). However, this boundary must shift to
lower temperatures as surface gravity (or density) is reduced. In the present
case, the surface gravity exceeds that of main-sequence stars, and so should
be satisfactory, but is significantly lower than that of most hot “subdwarfs”,
and so should be tested. For the purpose of validating the LTE analysis, we
examine how LTE and non-LTE models differ for the properties of this star.

To this end we have computed model atmospheres and emergent spectra with the
codes tlusty and synspec (version 208) (Hubeny & Lanz, 2017a, b, c; Hubeny et
al., 2021), including metals up to zinc at the same abundances as the sterne
models. We have computed models both with and without LTE in order to avoid
systematic differences arising from idiosyncrasies peculiar to either tlusty
and synspec or to sterne and spectrum. The models were computed at 34 000 K
with a $\log{g}$/cm s-2 of 4.75, a helium number fraction of 99% and a $v_{\rm
t}$ of 5 km s-1.

The distribution of temperature with optical depth is shown in Fig. 7. The
three models shown are similar above $\log{\tau}>0$, but begin to diverge in
the higher layers of the atmosphere. Systematic differences between the sterne
and tlusty LTE models, such as the different treatment of opacities and
opacity sampling, contribute to the relatively hotter outer layers of the
sterne model.

The flux in the NLTE model is $\sim$4% lower in the region for which broadband
photometry data are available (3 000 to 50 000 Å). This effect would
contribute to a $\sim$4% lower luminosity and a $\sim$2% lower radius
estimation.

In the NLTE model, the neutral He line profiles are both deeper in the core
and have less flux in the wings. An NLTE analysis with these models would
likely measure a lower surface gravity, but only by $<0.25$ dex. The
temperature would likewise have been measured slightly lower, by $<1000$ K, as
the NLTE model has deeper He II lines and the singly ionised states of carbon
and nitrogen are underpopulated compared to the doubly ionised states. This
would also affect the abundance measurement of these species, leading to an
estimated increase in abundance of $\sim 20\%$, given the values of the
departure coefficients in the line-forming region.

Whilst models with non-LTE ion populations will certainly improve the fits to
most H and He i line profiles, it is not yet clear that all discrepancies in
the fits will be resolved. Further work might include better theoretical
profiles in synspec, with new line broadening tables and consideration of
other potential systematic errors such as departures from plane-parallel
geometry.

This brief investigation of LTE vs. NLTE and tlusty vs. sterne has provided an
order of magnitude estimate of the systematic uncertainty which arises from
the choice of physics. It has not indicated what the optimum approach might
be, though the hybrid LTE model with NLTE formal solution recommended by Nieva
& Przybilla (2007) may prove applicable here also.

##  5 Conclusions

We have presented a detailed analysis of optical spectra of BPS CS
22940$-$0009 to investigate its properties and compare it to similar stars.
Precise measurements of the atmospheric parameters and surface abundances have
been obtained using grids of line-blanketed, LTE model atmospheres. We found
BPS CS 22940$-$0009 to lie on the boundary between the He-sdB and EHe stars in
$g$-$T$ space, connecting the two classes. Due to its luminosity class, the
star should not be considered as a true helium-rich subdwarf, but rather a
particularly hot, high-gravity extreme helium star. The surface abundances
show a composition of CNO-processed material with an intrinsically low
metallicity. Strong carbon enhancement suggests that the star formed from a
high-mass composite merger of two helium white dwarfs. BPS CS 22940$-$0009 is
likely now in a post-merger process of evolving towards the helium main
sequence and becoming a true He-sdB star.

This conclusion would fail were BPS CS 22940$-$0009 to be a member of a close
binary. There is no evidence for a cool companion in the SED. We found no
evidence of periodic variability in the TESS photometry for periods $\leq 4$
d. Our attempts to identify variability in the radial velocity (e.g. due to
binarity) were inconclusive.

As a footnote (Section 4.3), we investigated the impact of the LTE assumption
on our analysis, and infer that a modest reduction in $T_{\rm eff}$ and $g$
and a modest increase in elemental abundances would result from a non-LTE
analysis. However the differences were comparable with those obtained when
comparing LTE models computed with two different model atmosphere codes.
Consequently, the LTE assumption has little effect on our overall conclusion.

## Acknowledgements

The authors thank Andreas Irrgang and Matti Dorsch for the use of and
assistance with the implementation of the isis SED fitting routines and Matti
Dorsch for advice on the use of tlusty. They thank the referee for
constructive remarks which have led to substantial revision of the paper.

Some observations reported in this paper were obtained with the Southern
African Large Telescope (SALT). This paper includes data collected by the TESS
mission. Funding for the TESS mission is provided by the NASA’s Science
Mission Directorate. This research has made use of isis functions
(isisscripts) provided by ECAP/Remeis observatory and MIT
(http://www.sternwarte.uni-erlangen.de/isis/). This research has made use of
the VizieR catalogue access tool, CDS, Strasbourg, France (Ochsenbein & et.
al, 2000).

EJS is supported by the United Kingdom (UK) Science and Technology Facilities
Council (STFC) via UK Research and Innovations (UKRI) doctoral training grant
ST/R504609/1. LJAS and CSJ are supported by the STFC via UKRI research grant
ST/V000438/1. The Armagh Observatory and Planetarium (AOP) is funded by direct
grant from the Northern Ireland Dept for Communities. This funding also
provides for AOP membership of the United Kingdom SALT consortium (UKSC). For
the purpose of open access, the authors have applied a Creative Commons
Attribution (CC BY) license to any Author Accepted Manuscript version arising.

## Data Availability

The raw and pipeline reduced SALT observations are available from the SALT
Data Archive (https://ssda.saao.ac.za). The model atmospheres and spectra
computed for this project are available via the Armagh Observatory and
Planetarium web server (https://armagh.space/$\sim$SJeffery/). TESS
photometric data are available through the MAST portal
(https://mast.stsci.edu).

## References

  * Abbott et al. (2018) Abbott T. M. C., Abdalla F. B., Allam S., et al. 2018, ApJS, 239, 18
  * Ahmad & Jeffery (2003) Ahmad A., Jeffery C. S., 2003, A&A, 402, 335
  * Ahmad & Jeffery (2004) Ahmad A., Jeffery C., 2004, A&A, 413, 323
  * Anderson & Grigsby (1991) Anderson L., Grigsby J. A., 1991, in Crivellari L., Hubeny I., Hummer D. G., eds, NATO Advanced Study Institute (ASI) Series C Vol. 341, Stellar Atmospheres - Beyond Classical Models. p. 365
  * Asplund et al. (2009) Asplund M., Grevesse N., Sauval A. J., Scott P., 2009, ARA&A, 47, 481
  * Beers et al. (1992) Beers T. C., Preston G. W., Shectman S. A., Doinidis S. P., Griffin K. E., 1992, AJ, 103, 267
  * Behara & Jeffery (2006) Behara N. T., Jeffery C. S., 2006, A&A, 451, 643
  * Brown et al. (2001) Brown T., Sweigart A., Lanz T., Landsman W., Hubeny I., 2001, ApJ, 562, 368
  * Byrne et al. (2018) Byrne C. M., Jeffery C. S., Tout C. A., Hu H., 2018, MNRAS, 475, 4728
  * Cayrel (1988) Cayrel R., 1988, in Cayrel de Strobel G., Spite M., eds, International Astronomical Union Symposia Vol. 132, The Impact of Very High S/N Spectroscopy on Stellar Physics. p. 345
  * Drilling et al. (1984) Drilling J. S., Schonberner D., Heber U., Lynas-Gray A. E., 1984, ApJ, 278, 224
  * Drilling et al. (1998) Drilling J. S., Jeffery C. S., Heber U., 1998, A&A, 329, 1019
  * Drilling et al. (2013) Drilling J. S., Jeffery C. S., Heber U., Moehler S., Napiwotzki R., 2013, A&A, 551, A31
  * Fano (1961) Fano U., 1961, Physical Review, 124, 1866
  * Fitzpatrick et al. (2019) Fitzpatrick E. L., Massa D., Gordon K. D., Bohlin R., Clayton G. C., 2019, ApJ, 886, 108
  * Gaia Collaboration et al. (2021) Gaia Collaboration Brown A. G. A., Vallenari A., et al. 2021, A&A, 649, A1
  * Gray (1976) Gray D., 1976, The Observation and Analysis of Stellar Photospheres. Wiley
  * Green et al. (1986) Green R. F., Schmidt M., Liebert J., 1986, ApJS, 61, 305
  * Grigsby et al. (1992) Grigsby J. A., Morrison N. D., Anderson L. S., 1992, ApJS, 78, 205
  * Heber (1983) Heber U., 1983, A&A, 118, 39
  * Heber (1986a) Heber U., 1986a, in Hunger K., Schönberner D., Kameswara Rao N., eds, Astrophysics and Space Science Library Vol. 128, IAU Colloq. 87: Hydrogen Deficient Stars and Related Objects. pp 73–77
  * Heber (1986b) Heber U., 1986b, A&A, 155, 33
  * Heber et al. (2018) Heber U., Irrgang A., Schaffenroth J., 2018, Open Astronomy, 27, 35
  * Henden et al. (2015) Henden A. A., Levine S., Terrell D., Welch D. L., 2015, in American Astronomical Society Meeting Abstracts #225. p. 336.16
  * Hubeny & Lanz (2017a) Hubeny I., Lanz T., 2017a, arXiv e-prints, p. arXiv:1706.01859
  * Hubeny & Lanz (2017b) Hubeny I., Lanz T., 2017b, arXiv e-prints, p. arXiv:1706.01935
  * Hubeny & Lanz (2017c) Hubeny I., Lanz T., 2017c, arXiv e-prints, p. arXiv:1706.01937
  * Hubeny et al. (2021) Hubeny I., Allende Prieto C., Osorio Y., Lanz T., 2021, arXiv e-prints, p. arXiv:2104.02829
  * Hunger (1975) Hunger K., 1975, in B. Baschek W. H. Kegel . G. T., ed., , Problems in stellar atmospheres and envelopes.. Springer-Verlag, Berlin, Heidelberg, New York, pp 57–100
  * Iben & Tutukov (1984) Iben I. J., Tutukov A. V., 1984, ApJS, 54, 335
  * Iben et al. (1983) Iben I. J., Kaler J. B., Truran J. W., Renzini A., 1983, ApJ, 264, 605
  * Irrgang et al. (2021) Irrgang A., Geier S., Heber U., Kupfer T., El-Badry K., Bloemen S., 2021, A&A, 650, A102
  * Jeffery (1996) Jeffery C. S., 1996, in Jeffery C. S., Heber U., eds, Astronomical Society of the Pacific Conference Series Vol. 96, Hydrogen Deficient Stars. p. 152
  * Jeffery (1998) Jeffery C., 1998, MNRAS, 294, 391
  * Jeffery (2008) Jeffery C. S., 2008, Information Bulletin on Variable Stars, 5817, 1
  * Jeffery (2017) Jeffery C. S., 2017, MNRAS, 470, 3557–3565
  * Jeffery & Miszalski (2019) Jeffery C. S., Miszalski B., 2019, MNRAS, 489, 1481
  * Jeffery et al. (1999) Jeffery C. S., Hill P. W., Heber U., 1999, A&A, 346, 491
  * Jeffery et al. (2001) Jeffery C. S., Woolf V. M., Pollacco D. L., 2001, A&A, 376, 497
  * Jeffery et al. (2011) Jeffery C. S., Karakas A. I., Saio H., 2011, MNRAS, 414, 3599–3616
  * Jeffery et al. (2021) Jeffery C. S., Miszalski B., Snowdon E. J., 2021, MNRAS, 501, 623
  * Klemola (1961) Klemola A. R., 1961, ApJ, 134, 130
  * Lanz et al. (2004) Lanz T., Brown T. M., Sweigart A. V., Hubeny I., Landsman W. B., 2004, ApJ, 602, 342
  * Leuenhagen et al. (1994) Leuenhagen U., Heber U., Jeffery C. S., 1994, A&AS, 103, 445
  * Lindegren et al. (2021) Lindegren L., et al., 2021, A&A, 649, A4
  * McMahon et al. (2013) McMahon R. G., Banerji M., Gonzalez E., Koposov S. E., Bejar V. J., Lodieu N., Rebolo R., VHS Collaboration 2013, The Messenger, 154, 35
  * Mihalas (1978) Mihalas D., 1978, Stellar atmospheres. W. H. Freeman, p. 544
  * Miller Bertolami et al. (2008) Miller Bertolami M. M., Althaus L. G., Unglaub K., Weiss A., 2008, A&A, 491, 253
  * Naslim et al. (2010) Naslim N., Jeffery C. S., Ahmad A., Behara N. T., Şahìn T., 2010, MNRAS, 409, 582
  * Naslim et al. (2019) Naslim N., Jeffery C. S., Woolf V. M., 2019, MNRAS
  * Nieva & Przybilla (2007) Nieva M. F., Przybilla N., 2007, A&A, 467, 295
  * Ochsenbein & et. al (2000) Ochsenbein F., et. al 2000, A&AS, 143, 23
  * Onken et al. (2019) Onken C. A., et al., 2019, Publ. Astron. Soc. Australia, 36, e033
  * Pandey & Lambert (2011) Pandey G., Lambert D. L., 2011, ApJ, 727, 122
  * Pandey et al. (2006) Pandey G., Lambert D. L., Jeffery C. S., Rao N. K., 2006, ApJ, 638, 454
  * Pereira (2011) Pereira C., 2011, PhD thesis, Queen’s University Belfast
  * Press et al. (1989) Press W. H., Flannery B. P., Teukolsky S. A., Vetterling W. T., 1989, Numerical Recipes in FORTRAN. Cambridge University Press
  * Saio & Jeffery (2000) Saio H., Jeffery C. S., 2000, MNRAS, 313, 671
  * Saio & Jeffery (2002) Saio H., Jeffery C. S., 2002, MNRAS, 333, 121
  * Schlafly et al. (2019) Schlafly E. F., Meisner A. M., Green G. M., 2019, ApJS, 240, 30
  * Skrutskie et al. (2006) Skrutskie M. F., et al., 2006, AJ, 131, 1163
  * Stetson & Pancino (2008) Stetson P. B., Pancino E., 2008, PASP, 120, 1332
  * Webbink (1984) Webbink R. F., 1984, ApJ, 277, 355
  * Yan & Seaton (1987) Yan Y., Seaton M. J., 1987, Journal of Physics B Atomic Molecular Physics, 20, 6409
  * Zhang & Jeffery (2011) Zhang X., Jeffery C. S., 2011, MNRAS, 419, 452

Figure A.8: Comparison of the renormalised SALT HRS spectrum of BPS CS
22940$-$0009 (black) and a synthetic spectrum (red) created in spectrum using
the parameter and abundance results of this analysis. Figure A.9: Fig.A.8
contd. Figure A.10: Fig.A.8 contd. Figure A.11: Fig.A.8 contd.

##  Appendix A Renormalised HRS spectrum with formal solution

The SALT HRS spectrum of BPS CS 22940$-$0009 and our computed synthetic
spectrum are shown in Figs.A.8-A.11.

| Species/ |  |  | Species/ |  |  | Species/ |
---|---|---|---|---|---|---|---|---
$\lambda$ (Å) |  $W_{\lambda}$ (mÅ) | $\log\epsilon$ |  $\lambda$ (Å) |  $W_{\lambda}$ (mÅ) | $\log\epsilon$ |  $\lambda$ (Å) |  $W_{\lambda}$ (mÅ) | $\log\epsilon$
| H i |  |  | N ii (cont.) |  |  | N iii |
4340.46 | 382 $\pm$ 82 | 9.44 | 4227.74 | 52 $\pm$ 30 | 8.54 $\pm$ 6.12 | 4378.93 | 85 $\pm$ 30 | 8.57 $\pm$ 0.33
4861.32 | 570 $\pm$ 53 | 9.50 | 4236.93 | 103 $\pm$ 37 | 9.04 $\pm$ 0.41 | 4379.11 | 79 $\pm$ 32 | 8.40 $\pm$ 0.38
| C ii |  | 4237.05 | 102 $\pm$ 38 | 8.84 $\pm$ 0.46 | 4544.80 | 15 $\pm$ 8 | 8.30 $\pm$ 1.41
4267.02 | 287 $\pm$ 74 | 9.50 $\pm$ 0.27 | 4241.18 | 34 $\pm$ 15 | 8.71 $\pm$ 0.30 | 4546.32 | 7 $\pm$ 5 | 7.83 $\pm$ 0.25
4267.27 | 281 $\pm$ 71 | 9.30 $\pm$ 0.26 | 4241.76 | 107 $\pm$ 30 | 8.59 $\pm$ 0.33 | 4547.30 | 7 $\pm$ 5 | 8.64 $\pm$ 0.42
4285.70 | 31 $\pm$ 21 | 9.33 $\pm$ 0.41 | 4241.76 | 104 $\pm$ 28 | 8.56 $\pm$ 0.33 | 4640.64 | 133 $\pm$ 32 | 8.67 $\pm$ 0.61
4307.58 | 23 $\pm$ 20 | 8.96 $\pm$ 0.50 | 4242.44 | 34 $\pm$ 16 | 8.71 $\pm$ 0.32 | 4640.64 | 131 $\pm$ 31 | 8.65 $\pm$ 0.30
4313.10 | 74 $\pm$ 29 | 9.87 $\pm$ 0.53 | 4247.22 | 62 $\pm$ 24 | 9.85 $\pm$ 0.36 | 4641.85 | 59 $\pm$ 20 | 8.67 $\pm$ 0.32
4317.26 | 92 $\pm$ 34 | 9.83 $\pm$ 0.58 | 4417.10 | 48 $\pm$ 19 | 9.02 $\pm$ 0.33 | 4641.85 | 58 $\pm$ 20 | 8.65 $\pm$ 0.34
4318.60 | 51 $\pm$ 26 | 9.48 $\pm$ 0.49 | 4427.24 | 62 $\pm$ 28 | 8.95 $\pm$ 0.46 |  | O ii |
4321.65 | 44 $\pm$ 22 | 9.84 $\pm$ 0.42 | 4427.96 | 129 $\pm$ 48 | 9.99 $\pm$ 0.47 | 4319.63 | 11 $\pm$ 14 | 7.35 $\pm$ 0.61
4323.10 | 16 $\pm$ 13 | 9.39 $\pm$ 0.45 | 4431.82 | 35 $\pm$ 18 | 8.60 $\pm$ 0.37 | 4345.56 | 21 $\pm$ 19 | 7.66 $\pm$ 0.55
4368.27 | 102 $\pm$ 31 | 9.76 $\pm$ 0.40 | 4432.74 | 74 $\pm$ 26 | 8.53 $\pm$ 0.42 | 4349.43 | 10 $\pm$ 14 | 6.87 $\pm$ 0.66
4368.27 | 102 $\pm$ 31 | 9.53 $\pm$ 0.39 | 4433.48 | 34 $\pm$ 18 | 8.46 $\pm$ 0.36 | 4351.26 | 15 $\pm$ 14 | 7.35 $\pm$ 0.49
4369.87 | 54 $\pm$ 20 | 9.36 $\pm$ 0.34 | 4442.02 | 46 $\pm$ 18 | 8.35 $\pm$ 0.31 | 4414.90 | 31 $\pm$ 15 | 7.49 $\pm$ 0.34
4370.69 | 5 $\pm$ 6 | 8.46 $\pm$ 0.58 | 4447.03 | 82 $\pm$ 25 | 8.67 $\pm$ 0.48 | 4590.97 | 14 $\pm$ 8 | 7.23 $\pm$ 0.31
4372.33 | 129 $\pm$ 32 | 9.67 $\pm$ 0.22 | 4507.56 | 24 $\pm$ 18 | 8.96 $\pm$ 0.43 | 4661.63 | 8 $\pm$ 6 | 7.16 $\pm$ 0.34
4372.33 | 129 $\pm$ 32 | 9.69 $\pm$ 0.29 | 4508.79 | 14 $\pm$ 13 | 9.11 $\pm$ 0.46 | 4699.22 | 19 $\pm$ 11 | 7.87 $\pm$ 0.32
4372.49 | 130 $\pm$ 32 | 9.62 $\pm$ 0.27 | 4530.40 | 81 $\pm$ 22 | 8.57 $\pm$ 0.79 | 4705.35 | 6 $\pm$ 5 | 6.84 $\pm$ 0.39
4372.49 | 130 $\pm$ 32 | 9.62 $\pm$ 0.29 | 4552.53 | 120 $\pm$ 30 | 9.51 $\pm$ 0.31 |  | Ne ii |
4374.27 | 95 $\pm$ 28 | 9.18 $\pm$ 0.25 | 4601.48 | 99 $\pm$ 31 | 9.31 $\pm$ 0.57 | 4219.74 | 41 $\pm$ 22 | 8.00 $\pm$ 0.39
4375.01 | 58 $\pm$ 21 | 9.40 $\pm$ 0.30 | 4602.53 | 25 $\pm$ 16 | 9.01 $\pm$ 0.38 | 4233.85 | 7 $\pm$ 10 | 7.57 $\pm$ 0.66
4376.56 | 52 $\pm$ 19 | 8.91 $\pm$ 0.28 | 4607.16 | 91 $\pm$ 28 | 9.27 $\pm$ 0.51 | 4250.65 | 6 $\pm$ 8 | 7.51 $\pm$ 0.63
4409.16 | 42 $\pm$ 18 | 8.94 $\pm$ 0.33 | 4608.09 | 23 $\pm$ 12 | 8.86 $\pm$ 0.30 | 4290.37 | 17 $\pm$ 15 | 7.84 $\pm$ 0.50
4409.99 | 38 $\pm$ 16 | 8.57 $\pm$ 0.31 | 4613.87 | 61 $\pm$ 20 | 8.80 $\pm$ 0.42 | 4290.60 | 17 $\pm$ 15 | 7.94 $\pm$ 0.48
4411.20 | 94 $\pm$ 29 | 9.31 $\pm$ 0.36 | 4621.29 | 98 $\pm$ 24 | 9.40 $\pm$ 0.44 | 4369.86 | 34 $\pm$ 24 | 8.54 $\pm$ 0.48
4411.52 | 108 $\pm$ 22 | 9.31 $\pm$ 0.26 | 4630.54 | 156 $\pm$ 31 | 9.60 $\pm$ 0.26 | 4379.55 | 81 $\pm$ 32 | 8.63 $\pm$ 0.41
4413.26 | 23 $\pm$ 11 | 9.37 $\pm$ 0.27 | 4643.09 | 86 $\pm$ 24 | 9.09 $\pm$ 0.49 | 4391.99 | 29 $\pm$ 20 | 7.64 $\pm$ 0.43
4637.63 | 32 $\pm$ 11 | 9.64 $\pm$ 0.23 | 4654.53 | 60 $\pm$ 23 | 9.56 $\pm$ 0.37 | 4397.99 | 20 $\pm$ 13 | 8.21 $\pm$ 0.36
4638.92 | 51 $\pm$ 19 | 9.66 $\pm$ 0.33 | 4667.21 | 17 $\pm$ 8 | 8.78 $\pm$ 0.23 | 4409.30 | 31 $\pm$ 13 | 7.81 $\pm$ 0.28
4867.07 | 38 $\pm$ 11 | 9.73 $\pm$ 0.22 | 4674.91 | 18 $\pm$ 10 | 8.83 $\pm$ 0.30 | 4413.22 | 27 $\pm$ 13 | 8.01 $\pm$ 0.30
4953.86 | 34 $\pm$ 17 | 9.75 $\pm$ 0.35 | 4678.14 | 66 $\pm$ 21 | 8.59 $\pm$ 0.33 | 4428.63 | 31 $\pm$ 19 | 8.08 $\pm$ 0.40
5032.13 | 58 $\pm$ 16 | 9.60 $\pm$ 0.28 | 4694.70 | 73 $\pm$ 30 | 8.97 $\pm$ 0.40 | 4430.79 | 15 $\pm$ 16 | 7.77 $\pm$ 0.58
5035.94 | 56 $\pm$ 23 | 9.68 $\pm$ 0.40 | 4718.38 | 17 $\pm$ 9 | 8.87 $\pm$ 0.29 | 4430.95 | 15 $\pm$ 17 | 8.16 $\pm$ 0.60
5040.71 | 36 $\pm$ 21 | 9.70 $\pm$ 0.42 | 4774.24 | 11 $\pm$ 6 | 8.40 $\pm$ 0.31 | 4511.48 | 18 $\pm$ 19 | 7.88 $\pm$ 0.59
5044.36 | 23 $\pm$ 20 | 9.31 $\pm$ 0.53 | 4779.72 | 42 $\pm$ 14 | 8.79 $\pm$ 0.29 | 4522.72 | 12 $\pm$ 8 | 7.94 $\pm$ 0.36
| C iii |  | 4788.13 | 57 $\pm$ 21 | 8.89 $\pm$ 0.41 |  | Mg ii |
4152.51 | 110 $\pm$ 50 | 9.92 $\pm$ 0.58 | 4793.65 | 18 $\pm$ 12 | 8.70 $\pm$ 0.37 | 4481.13 | 86 $\pm$ 32 | 7.86 $\pm$ 0.41
4186.90 | 175 $\pm$ 62 | 9.18 $\pm$ 0.44 | 4803.29 | 131 $\pm$ 27 | 9.80 $\pm$ 0.28 | 4481.13 | 85 $\pm$ 32 | 7.84 $\pm$ 0.41
4315.44 | 52 $\pm$ 25 | 9.27 $\pm$ 0.39 | 4810.31 | 8 $\pm$ 7 | 8.25 $\pm$ 0.46 | 4481.33 | 87 $\pm$ 34 | 7.74 $\pm$ 0.41
4382.90 | 86 $\pm$ 38 | 9.82 $\pm$ 0.42 | 4970.23 | 15 $\pm$ 10 | 8.71 $\pm$ 0.57 |  | Al iii |
4515.33 | 29 $\pm$ 17 | 8.98 $\pm$ 0.40 | 4987.38 | 32 $\pm$ 15 | 8.72 $\pm$ 0.34 | 4149.90 | 7 $\pm$ 15 | 5.72 $\pm$ 1.04
4515.78 | 47 $\pm$ 22 | 8.87 $\pm$ 0.33 | 4991.22 | 41 $\pm$ 22 | 9.28 $\pm$ 0.49 | 4150.14 | 5 $\pm$ 14 | 5.72 $\pm$ 1.31
4516.77 | 65 $\pm$ 27 | 8.93 $\pm$ 0.37 | 4994.35 | 47 $\pm$ 30 | 9.76 $\pm$ 0.53 | 4479.89 | 19 $\pm$ 9 | 6.07 $\pm$ 0.27
4651.01 | 54 $\pm$ 28 | 9.06 $\pm$ 7.20 | 4994.36 | 48 $\pm$ 29 | 9.77 $\pm$ 0.50 | 4479.97 | 17 $\pm$ 11 | 6.02 $\pm$ 0.33
4651.47 | 180 $\pm$ 50 | 9.36 $\pm$ 0.38 | 4994.37 | 46 $\pm$ 29 | 9.73 $\pm$ 0.51 | 4512.54 | 20 $\pm$ 25 | 6.12 $\pm$ 0.71
4659.06 | 46 $\pm$ 19 | 9.14 $\pm$ 8.01 | 4997.23 | 16 $\pm$ 12 | 9.12 $\pm$ 0.43 | 4529.20 | 41 $\pm$ 15 | 6.38 $\pm$ 0.33
4663.64 | 56 $\pm$ 14 | 9.22 $\pm$ 0.26 | 5001.13 | 101 $\pm$ 30 | 9.19 $\pm$ 0.54 |  | Si iii |
4665.86 | 101 $\pm$ 20 | 9.39 $\pm$ 0.30 | 5001.47 | 112 $\pm$ 35 | 9.20 $\pm$ 0.56 | 4813.30 | 32 $\pm$ 11 | 7.08 $\pm$ 0.22
4665.86 | 102 $\pm$ 19 | 9.40 $\pm$ 0.28 | 5002.70 | 41 $\pm$ 19 | 8.93 $\pm$ 0.41 | 4819.72 | 32 $\pm$ 11 | 6.96 $\pm$ 0.22
4673.95 | 101 $\pm$ 20 | 9.54 $\pm$ 0.36 | 5005.15 | 89 $\pm$ 27 | 8.65 $\pm$ 0.54 | 4828.96 | 48 $\pm$ 16 | 7.15 $\pm$ 0.27
| N ii |  | 5007.33 | 69 $\pm$ 17 | 8.71 $\pm$ 0.35 |  | Si iv |
4133.67 | 37 $\pm$ 22 | 9.04 $\pm$ 9.76 | 5010.62 | 62 $\pm$ 21 | 8.91 $\pm$ 0.45 | 4212.41 | 23 $\pm$ 14 | 6.69 $\pm$ 0.39
4171.60 | 83 $\pm$ 28 | 8.84 $\pm$ 0.38 | 5011.30 | 20 $\pm$ 12 | 8.75 $\pm$ 0.35 |  | S iii |
4173.57 | 36 $\pm$ 20 | 8.81 $\pm$ 0.36 | 5012.03 | 37 $\pm$ 16 | 8.87 $\pm$ 0.36 | 4253.59 | 33 $\pm$ 21 | 6.17 $\pm$ 0.43
4176.16 | 75 $\pm$ 28 | 8.39 $\pm$ 0.40 | 5023.05 | 36 $\pm$ 16 | 9.17 $\pm$ 0.36 | 4284.98 | 26 $\pm$ 16 | 6.31 $\pm$ 0.38
4179.67 | 58 $\pm$ 25 | 8.92 $\pm$ 0.36 | 5025.66 | 31 $\pm$ 11 | 8.47 $\pm$ 0.26 | 4332.69 | 7 $\pm$ 8 | 5.98 $\pm$ 0.52
4195.97 | 65 $\pm$ 36 | 9.16 $\pm$ 2.00 | 5045.09 | 100 $\pm$ 38 | 9.44 $\pm$ 0.66 | 4361.53 | 16 $\pm$ 12 | 6.52 $\pm$ 0.38
4199.98 | 73 $\pm$ 32 | 8.96 $\pm$ 0.47 | 5073.59 | 25 $\pm$ 10 | 8.75 $\pm$ 0.25 |  |  |
Table B.6: All spectral line measurements used in the abundance calculations
for BPS CS 22940$-$0009\. $W_{\lambda}$ is the measured equivalent width for
each line, with associated error. $\log\epsilon$ is the abundance result and
error calculated from $W_{\lambda}$ by spectrum. No errors were reported for
the hydrogen lines.

##  Appendix B Table of line measurements

The equivalent widths of all lines used in the measurement of elemental
abundances are shown in Table B.6.

##  Appendix C Detection thresholds for absorption lines in stellar spectra

Various approaches to determine the detection limit for weak spectral features
may be found (e.g. Cayrel, 1988; Stetson & Pancino, 2008); that adopted here
is as follows.

The spectrum of radiation $f$ emitted by a body as a function of wavelength
$\lambda$ is assumed to consist of a continuum $c(\lambda)$ interrupted by
absorption lines. Defining $a\equiv f/c$, the equivalent width of an isolated
absorption line is

$W_{\lambda}=\int_{\lambda_{p}}^{\lambda_{q}}\Big{(}1-\frac{f(\lambda)}{c(\lambda)}\Big{)}d\lambda=\int_{\lambda_{p}}^{\lambda_{q}}(1-a(\lambda))d\lambda,$

where the integration limits ${\lambda_{p}},{\lambda_{q}}$ bracket the line in
question.

The continuum flux $c(\lambda)$ in the vicinity of an absorption line may be
approximated by a polynomial fit $c_{0}(\lambda)$ to regions of local spectrum
excluding absorption lines. Supposing that the spectrum is sampled discretely
at wavelengths $\lambda_{i}$ (pixels) and at intervals $\delta\lambda$ and
rectifying such that $a_{i}=f_{i}/c_{0}$, then

$W_{\lambda}\approx\sum_{i=p}^{q}(1-a_{i})\delta\lambda.$

In continuum regions containing N pixels, the mean value $\bar{a}\equiv\langle
f_{i}/c_{0}\rangle=1$ and has a standard deviation

$\sigma_{a}=\sqrt{\frac{1}{N-1}\sum_{i=1}^{N}(a_{i}-\bar{a})^{2}}.$

If each measurement $a_{i}$ is associated with a measurement error
$\sigma_{i}$, and assuming errors associated with each pixel are independent
and Poissonian, and that $\langle\sigma_{i}\rangle\approx\sigma_{a}$, the
associated error in $W_{\lambda}$ is

$\sigma_{W}\approx\sigma_{a}\sqrt{\frac{W_{\lambda}}{\delta\lambda}}.$

In general, $\sigma_{i}\approx\sigma_{a}/\sqrt{a_{i}}$. Hence, more precisely,

$\sigma_{W}\approx\frac{\sigma_{a}}{\sqrt{\langle
a_{i}\rangle}}\sqrt{\frac{W_{\lambda}}{\delta\lambda}}.$

The corollary is that, for weak lines where $\langle a_{i}\rangle\approx 1$,
the signal-to-noise ratio $R_{\rm SN}$ for a line of equivalent width
$W_{\lambda}$ is given by

$R_{\rm
SN}\equiv\frac{W_{\lambda}}{\sigma_{W}}\approx\frac{\sqrt{W_{\lambda}\delta\lambda}}{\sigma_{a}}$

and hence

$R_{\rm SN}\geq n\;{\rm
if}\;W_{\lambda}\geq\frac{n^{2}\sigma_{a}^{2}}{\delta\lambda}.$

The latter provides a threshold for the detection (or non-detection) or a weak
line, with $n=1,2$ and $3$ representing confidence levels for detection of
68%, 90%, and 99% respectively.