File: lsfile.h

package info (click to toggle)
astrometry.net 0.93%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 19,372 kB
  • sloc: ansic: 163,192; python: 18,357; makefile: 1,522; sh: 138; cpp: 78; pascal: 67; awk: 56; perl: 9
file content (51 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
# This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
*/

#ifndef LS_FILE_H
#define LS_FILE_H

#include <stdio.h>
#include "astrometry/bl.h"

/**
   __ls files look like this:

   NumFields=20
   # comment
   3,3.7,5.6,4.3,1,3,7
   2,7,8,9,0

   ie, for each field, the number of objects is given,
   followed by the positions of the objects.

   Returns a pl* containing a dl* for
   each field.  Each dl is a list of
   doubles of the positions of the objects.

   The "dimension" argument says how many elements to read
   per field, ie, what the dimensionality of the position is.
*/
pl* read_ls_file(FILE* fid, int dimension);

/**
   Frees the list returned by "read_ls_file".
*/
void ls_file_free(pl* l);

/**
   Returns the number of fields in this file, or -1 if
   reading fails.
*/
int read_ls_file_header(FILE* fid);

/**
   Reads one field from the file.

   The returned dl* contains (dimension * numpoints)
   doubles.
*/
dl* read_ls_file_field(FILE* fid, int dimension);

#endif