Commit c3b11576 authored by Laura Schreiber's avatar Laura Schreiber
Browse files

version with where_stars optimised

parent 4e216d1d
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
; $Id: extract_stars.pro, v 1.1 Mar 2012 e.d. $
; $Id: extract_stars.pro, v 2.0 Sep 2024 e.d. $
;
;+
; NAME:
@@ -26,11 +26,24 @@
; MODIFICATION HISTORY:
; 	Written by:	Emiliano Diolaiti, June 2001.
;   1) Created this file (E. D., March 2012).
;   2) Modified data type: from array of structures to structure of arrays (E.D., September 2024).
;-

FUNCTION extract_stars, list, n

    on_error, 2
    s = where_stars(list, n)
    if  n ne 0  then  return, list[s]  else  return, -1
    if  n ne 0  then begin
      sublist = starlist(n)
      sublist.x = list.x[s]
      sublist.sigma_x = list.sigma_x[s]
      sublist.y = list.y[s]
      sublist.sigma_y = list.sigma_y[s]
      sublist.f = list.f[s]
      sublist.sigma_f = list.sigma_f[s]
      sublist.c = list.c[s]
      sublist.is_a_star = list.is_a_star[s]
    endif else $
      sublist = -1
    return, sublist
end

is_star.pro

0 → 100644
+33 −0
Original line number Diff line number Diff line
; $Id: is_star.pro, v 1.0 Sep 2024 e.d. $
;
;+
; NAME:
;	IS_STAR
;
; PURPOSE:
;	Check status of one or more elements in the list of stars and presumed stars.
;
; CATEGORY:
;	STARFINDER auxiliary procedures.
;
; CALLING SEQUENCE:
;	Result = IS_STAR(List, S)
;
; INPUTS:
;	List:	list of stars and presumed stars
;
;	S:	subscript(s) of element(s) to be checked
;
; OUTPUTS:
;	Return scalar or array of binary values for each element defined by parameter S.
;	Returned value is 1 for a confirmed star, 0 otherwise.
;
; MODIFICATION HISTORY:
; 	Written by:	Emiliano Diolaiti, September 2024.
;-

FUNCTION is_star, list, s

    on_error, 2
    return, list.is_a_star[s] and 1B
end
+12 −7
Original line number Diff line number Diff line
; $Id: merge_list.pro, v 1.1 Mar 2001 e.d. $
; $Id: merge_list.pro, v 2.0 Sep 2024 e.d. $
;
;+
; NAME:
@@ -23,6 +23,7 @@
; 	Written by:	Emiliano Diolaiti, June 2001.
; 	1) Created this file (E. D., March 2012).
; 	2) Fixed bug when input list L1 is empty (E. D., April 2012).
; 	3) Modified data type: from array of structures to structure of arrays (E.D., September 2024).
;-

FUNCTION merge_list, l1, l2
@@ -31,13 +32,17 @@ FUNCTION merge_list, l1, l2
    if n_tags(l1) eq 0 then $
       l = l2 else $
    begin
       n1 = n_elements(l1)
;       if  n1 eq 0  then  l = l2  else $
;       begin
       n2 = n_elements(l2)
       n1 = n_elements(l1.is_a_star)
       n2 = n_elements(l2.is_a_star)
       l = starlist(n1 + n2)
       l[0] = l1  &  l[n1] = l2
;       endelse
       l.x = [l1.x, l2.x]
       l.sigma_x = [l1.sigma_x, l2.sigma_x]
       l.y = [l1.y, l2.y]
       l.sigma_y = [l1.sigma_y, l2.sigma_y]
       l.f = [l1.f, l2.f]
       l.sigma_f = [l1.sigma_f, l2.sigma_f]
       l.c = [l1.c, l2.c]
       l.is_a_star = [l1.is_a_star, l2.is_a_star]
    endelse
    return, l
end
+10 −13
Original line number Diff line number Diff line
StarFinder v 1.8.2a
Starfinder v 1.8.2b


WEB PAGE

http://davide2.bo.astro.it/?page_id=5128

https://www.ict.inaf.it/gitlab/laura.schreiber/starfinder2

ARCHIVE CONTENT

@@ -33,7 +32,7 @@ This archive includes the following files:

INSTALLATION

Open the compressed archive StarFinder.zip and put all its 
Open the compressed archive Starfinder.zip and put all its 
content in a new directory named 'starfinder'. Then modify the 
IDL system variable !Path including the path to the new directory.

@@ -44,24 +43,22 @@ THE IDL ASTRONOMY USER'S LIBRARY (http://idlastro.gsfc.nasa.gov).
INFO / BUGS REPORT

Please send information requests and bug reports to:
Emiliano Diolaiti (emiliano.diolaiti@oabo.inaf.it)
Laura Schreiber (laura.schreiber@oabo.inaf.it)
Laura Schreiber (laura.schreiber@inaf.it)
Emiliano Diolaiti (emiliano.diolaiti@inaf.it)



COPYRIGHT

The StarFinder software is provided "as is" without express or implied warranty.
The Starfinder software is provided "as is" without express or implied warranty.
It can be used freely for research and educational purposes.

Please reference the authors in any publication resulting from
the use of the StarFinder code. The references are:
the use of the Starfinder code. The references are:

Diolaiti E., Bendinelli O., Bonaccini D., Close L.M., Currie D.G., 
Parmeggiani G., Astronomy & Astrophysics Supplement Series, 147, 
335, 2000

Schreiber L., Diolaiti E., Bellazzini M., Ciliegi P., Foppiani I., 
Greggio L., Lanzoni B., Lombini M., Second International Conference 
on Adaptive Optics for Extremely Large Telescopes, 
Online at http://ao4elt2.lesia.obspm.fr, id.P57, 
Bibliographic Code 2011aoel.confP..57S, 2011
Schreiber L., Diolaiti E., Beltramo-Martin O., Fiorentino G., Proc. SPIE 11448, Adaptive Optics Systems VII, 114480H (14 December 2020); 
doi: 10.1117/12.2564105
+5 −5
Original line number Diff line number Diff line
; $Id: reverse_class.pro, v 1.1 Mar 2012 e.d. $
; $Id: reverse_class.pro, v 2.0 Sep 2024 e.d. $
;
;+
; NAME:
@@ -22,19 +22,19 @@
;		of all elements in the list
;
; OUTPUTS:
;	Return list where the classification of the subscripted elements;
;	is reversed
;	Return list where the classification of the subscripted elements is reversed
;
; MODIFICATION HISTORY:
; 	Written by:	Emiliano Diolaiti, June 2001.
; 	1) Created this file (E.D., March 2012).
; 	2) Modified data type: from array of structures to structure of arrays (E.D., September 2024).
;-

FUNCTION reverse_class, list, SUBSCRIPTS = s

    on_error, 2
    if  n_elements(s) eq 0  then  s = lindgen(n_elements(list))
    if  n_elements(s) eq 0  then  s = lindgen(n_elements(list.is_a_star))
    l = list
    l[s].is_a_star = (not l[s].is_a_star) and 1B
    l.is_a_star[s] = (not l.is_a_star[s]) and 1B
    return, l
end
Loading