-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathexofastv2.html
6563 lines (5520 loc) · 255 KB
/
exofastv2.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- This file was generated by mk_html_help.pro -->
<html>
<head>
<TITLE>Extended IDL Help</TITLE>
</head>
<body>
<H1>Extended IDL Help</H1>
<P>
This page was created by the IDL library routine
<CODE>mk_html_help</CODE>. For more information on
this routine, refer to the IDL Online Help Navigator
or type: <P>
<PRE> ? mk_html_help</PRE><P>
at the IDL command line prompt.<P>
<STRONG>Last modified: </STRONG>Wed Jun 26 15:52:28 2024.<P>
<HR>
<A NAME="ROUTINELIST">
<H1>List of Routines</H1></A>
<UL>
<LI><A HREF="#"></A>
<LI><A HREF="#ANGSEP">ANGSEP</A>
<LI><A HREF="#BJD2TARGET">BJD2TARGET</A>
<LI><A HREF="#CALCB[1]">CALCB[1]</A>
<LI><A HREF="#CALCB[2]">CALCB[2]</A>
<LI><A HREF="#COMPARESTARS">COMPARESTARS</A>
<LI><A HREF="#COMPARESTARS_CORNER[1]">COMPARESTARS_CORNER[1]</A>
<LI><A HREF="#COMPARESTARS_CORNER[2]">COMPARESTARS_CORNER[2]</A>
<LI><A HREF="#CONVERT_TRANSIT_TIMES">CONVERT_TRANSIT_TIMES</A>
<LI><A HREF="#CROSSREF">CROSSREF</A>
<LI><A HREF="#ELLKE">ELLKE</A>
<LI><A HREF="#ELLPIC_BULIRSCH">ELLPIC_BULIRSCH</A>
<LI><A HREF="#EXOFASTV2">EXOFASTV2</A>
<LI><A HREF="#EXOFAST_AMOEBA">EXOFAST_AMOEBA</A>
<LI><A HREF="#EXOFAST_ASTROM">EXOFAST_ASTROM</A>
<LI><A HREF="#EXOFAST_BLACKBODY">EXOFAST_BLACKBODY</A>
<LI><A HREF="#EXOFAST_CHI2">EXOFAST_CHI2</A>
<LI><A HREF="#EXOFAST_DEMC">EXOFAST_DEMC</A>
<LI><A HREF="#EXOFAST_ERRELL">EXOFAST_ERRELL</A>
<LI><A HREF="#EXOFAST_GELMANRUBIN">EXOFAST_GELMANRUBIN</A>
<LI><A HREF="#EXOFAST_GETB">EXOFAST_GETB</A>
<LI><A HREF="#EXOFAST_GETB2">EXOFAST_GETB2</A>
<LI><A HREF="#EXOFAST_GETMCMCSCALE">EXOFAST_GETMCMCSCALE</A>
<LI><A HREF="#EXOFAST_GETPHASE">EXOFAST_GETPHASE</A>
<LI><A HREF="#EXOFAST_GETTC">EXOFAST_GETTC</A>
<LI><A HREF="#EXOFAST_GETTT[1]">EXOFAST_GETTT[1]</A>
<LI><A HREF="#EXOFAST_GETTT[2]">EXOFAST_GETTT[2]</A>
<LI><A HREF="#EXOFAST_KEPLEREQ">EXOFAST_KEPLEREQ</A>
<LI><A HREF="#EXOFAST_LATEXTAB">EXOFAST_LATEXTAB</A>
<LI><A HREF="#EXOFAST_LATEXTAB2">EXOFAST_LATEXTAB2</A>
<LI><A HREF="#EXOFAST_LIKE">EXOFAST_LIKE</A>
<LI><A HREF="#EXOFAST_LOMBSCARGLE">EXOFAST_LOMBSCARGLE</A>
<LI><A HREF="#EXOFAST_MOD">EXOFAST_MOD</A>
<LI><A HREF="#EXOFAST_MULTIPLOT">EXOFAST_MULTIPLOT</A>
<LI><A HREF="#EXOFAST_OCCULTQUAD">EXOFAST_OCCULTQUAD</A>
<LI><A HREF="#EXOFAST_OCCULTQUAD_CEL">EXOFAST_OCCULTQUAD_CEL</A>
<LI><A HREF="#EXOFAST_PLOTDIST_CORNER">EXOFAST_PLOTDIST_CORNER</A>
<LI><A HREF="#EXOFAST_QUERYVIZIER">EXOFAST_QUERYVIZIER</A>
<LI><A HREF="#EXOFAST_RANDOM">EXOFAST_RANDOM</A>
<LI><A HREF="#EXOFAST_RECENTER">EXOFAST_RECENTER</A>
<LI><A HREF="#EXOFAST_ROSSITER">EXOFAST_ROSSITER</A>
<LI><A HREF="#EXOFAST_RV">EXOFAST_RV</A>
<LI><A HREF="#EXOFAST_TEXTOIDL[1]">EXOFAST_TEXTOIDL[1]</A>
<LI><A HREF="#EXOFAST_TEXTOIDL[2]">EXOFAST_TEXTOIDL[2]</A>
<LI><A HREF="#EXOFAST_TRAN">EXOFAST_TRAN</A>
<LI><A HREF="#EXOFAST_TWILIGHT">EXOFAST_TWILIGHT</A>
<LI><A HREF="#GETAVPRIOR">GETAVPRIOR</A>
<LI><A HREF="#GETBURNNDX">GETBURNNDX</A>
<LI><A HREF="#GOLDENRATIO">GOLDENRATIO</A>
<LI><A HREF="#JSON_PARSE">JSON_PARSE</A>
<LI><A HREF="#KTOM2">KTOM2</A>
<LI><A HREF="#LEGEND">LEGEND</A>
<LI><A HREF="#LINLD">LINLD</A>
<LI><A HREF="#MASSRADIUS_MANN">MASSRADIUS_MANN</A>
<LI><A HREF="#MASSRADIUS_MIST[1]">MASSRADIUS_MIST[1]</A>
<LI><A HREF="#MASSRADIUS_MIST[2]">MASSRADIUS_MIST[2]</A>
<LI><A HREF="#MASSRADIUS_PARSEC">MASSRADIUS_PARSEC</A>
<LI><A HREF="#MASSRADIUS_TORRES">MASSRADIUS_TORRES</A>
<LI><A HREF="#MKCONSTANTS">MKCONSTANTS</A>
<LI><A HREF="#MKPRIOR">MKPRIOR</A>
<LI><A HREF="#MKPRIOR2">MKPRIOR2</A>
<LI><A HREF="#MKSED">MKSED</A>
<LI><A HREF="#MKSS">MKSS</A>
<LI><A HREF="#MKTICSED">MKTICSED</A>
<LI><A HREF="#OMC">OMC</A>
<LI><A HREF="#PARS2STR">PARS2STR</A>
<LI><A HREF="#PLOTIMAGE">PLOTIMAGE</A>
<LI><A HREF="#QUADLD">QUADLD</A>
<LI><A HREF="#READIPAC">READIPAC</A>
<LI><A HREF="#REMAKE_CORNER">REMAKE_CORNER</A>
<LI><A HREF="#SETDEFAULTVALUE">SETDEFAULTVALUE</A>
<LI><A HREF="#SPLITPDF">SPLITPDF</A>
<LI><A HREF="#STROM_CONV[1]">STROM_CONV[1]</A>
<LI><A HREF="#STROM_CONV[2]">STROM_CONV[2]</A>
<LI><A HREF="#TEXTOIDL_MATCHDELIM">TEXTOIDL_MATCHDELIM</A>
<LI><A HREF="#TEXTOIDL_NEXTTOK">TEXTOIDL_NEXTTOK</A>
<LI><A HREF="#TEXTOIDL_STRCNT">TEXTOIDL_STRCNT</A>
<LI><A HREF="#TEXTOIDL_STRTOK">TEXTOIDL_STRTOK</A>
<LI><A HREF="#TEXTOIDL_STRTRANS">TEXTOIDL_STRTRANS</A>
<LI><A HREF="#TEXTOIDL_SUB_SUP">TEXTOIDL_SUB_SUP</A>
<LI><A HREF="#TEXTOIDL_TABLE">TEXTOIDL_TABLE</A>
<LI><A HREF="#TEXTOIDL_TRANS_SUB_SUPER">TEXTOIDL_TRANS_SUB_SUPER</A>
<LI><A HREF="#TRANSITGIF">TRANSITGIF</A>
<LI><A HREF="#UPDATETIME">UPDATETIME</A>
<LI><A HREF="#WAVELETLIKE">WAVELETLIKE</A>
</UL><P>
<HR>
<H1>Routine Descriptions</H1>
<A NAME="">
<H2></H2></A>
<A HREF="#ANGSEP">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
pg_ran
PURPOSE:
generates uniform random numbers
CATEGORY:
numeric utils
CALLING SEQUENCE:
data=pg_ran(seed,n)
INPUTS:
n: number of uniform random deviates to produce
OPTIONAL INPUTS:
seed: seed for the random number generator. Input is either a scalar integer
or an array of 3 UL64 integers. The internal seed of the routine is the
array of 3 UL64 integers.
KEYWORD PARAMETERS:
double: if set, output is double precision instead of ulong64
OUTPUTS:
data: a set of ulong64 integers, uniformly randomly distributed
between 0ULL and 2ULL^64-1
(if keyword /double is set - doubles between 0d and 1d will
be returned instead)
OPTIONAL OUTPUTS:
seed: the seed to be used to get the next number in the sequence.
It's an array of 3 L64 integers.
none
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
PROCEDURE:
IDL implementation of the routine "ran" of numerical
recipes 3d edition (page 342). This is a high quality
random generator with a period of ~ 3.138x10^57.
EXAMPLE:
seed=17
print,pg_ran(seed,10)
269952321389814056
7477734313819993120
16294976781531816119
17039904789424739738
4945048831639962635
1565409385732501729
7095006703038622919
13927236388846696772
150171266583137103
8092874815854888167
seed=17
print,pg_ran(seed,10,/double),format='(d17.15)'
0.014634144665917
0.405368789415652
0.883352461356882
0.923735089582023
0.268071634315548
0.084861012842019
0.384621084061685
0.754996997475338
0.008140800673717
0.438715622850155
MODIFICATION HISTORY:
2008 Paolo C. Grigis written
07-AUG-2009 Paolo C. Grigis updated documentation
12-NOV-2009 PG added /double keyword
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/pg_ran.pro)</STRONG><P>
<HR>
<A NAME="ANGSEP">
<H2>ANGSEP</H2></A>
<A HREF="#">[Previous Routine]</A>
<A HREF="#BJD2TARGET">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
angsep
PURPOSE:
Compute the angular distance between two spherical coordinates.
DESCRIPTION:
CATEGORY:
Mathematical
CALLING SEQUENCE:
ans=angsep(ra1,dec1,ra2,dec2)
INPUTS:
ra1 - RA of first position (radians)
dec1 - Dec of first position (radians)
ra2 - RA of second position (radians)
dec2 - Dec of second position (radians)
OPTIONAL INPUT PARAMETERS:
KEYWORD INPUT PARAMETERS:
OUTPUTS:
return value is the angular distance in radians.
KEYWORD OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
Written by Marc W. buie, Lowell Observatory, 1997/09/08
2009/02/26, MWB, added protection against round off error generating NaN
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/angsep.pro)</STRONG><P>
<HR>
<A NAME="BJD2TARGET">
<H2>BJD2TARGET</H2></A>
<A HREF="#ANGSEP">[Previous Routine]</A>
<A HREF="#CALCB[1]">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
BJD2TARGET
PURPOSE:
Iteratively calls TARGET2BJD to convert a BJD in Barycentric
Dynamical Time (BJD_TDB) to a BJD in the target barycenter
time (BJD_TARGET) within TOL days.
DESCRIPTION:
The opposite of TARGET2BJD; see description there.
INPUTS:
BJD_TDB - A scalar or array of BJDs in TDB. Must be double
precision.
INCLINATION - The inclination of the orbit
A - The semi-major axis of the orbit (AU)
TP - The time of periastron of the orbit (BJD_TARGET)
PERIOD - The period of the orbit (days)
E - Eccentricity of the orbit
OMEGA - Argument of Periastron of the orbit (radians)
OPTIONAL INPUTS:
Q - The mass ratio of the targets (M1/M2). If not
specified, an infinite mass ratio is assumed (M1 is
stationary at the barycenter) (8 ms effect for Hot
Jupiters).
TOL - The tolerance, in days. The iterative procedure will
stop after the worst-case agreement is better than this.
Default = 1d-8 (1 ms).
OPTIONAL KEYWORDS:
PRIMARY - If set, the information comes from the position of
the primary (as in RV), and therefore the correction
will be the light travel time from the center of the
primary to the Barycenter -- analagous to the
difference between HJD and BJD in our solar system
(only ~8 ms for Hot Jupiters, but increasing with a).
Otherwise, the correction will be the light
travel time from the smaller body to the barycenter
(as in transits) -- analagous to the difference
between JD and BJD in the Solar System.
NOTE: if Q is not specified and PRIMARY is, no
correction is applied.
OUTPUTS:
BJD_TARGET - The time as it would flow in the Barycenter of the target.
LIMITATIONS:
We ignore the distance to the object (plane parallel waves), which
should have a similar effect as the distance plays in the BJD
correction (< 1 ms). We also ignore the systemic velocity, which
will compress/expand the period by a factor gamma/c.
REVISION HISTORY:
2011/06: Written by Jason Eastman (OSU)
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/bjd2target.pro)</STRONG><P>
<HR>
<A NAME="CALCB[1]">
<H2>CALCB[1]</H2></A>
<A HREF="#BJD2TARGET">[Previous Routine]</A>
<A HREF="#CALCB[2]">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
CALCB
PURPOSE:
Calculates the impact parameter of a given time. The function to minimize
Implementation translated from here:
https://en.wikipedia.org/wiki/Golden-section_search
CALLING SEQUENCE:
min = goldenratio('func', min, max)
INPUTS:
FUNC - A string specifying the name of the function to be
minimized
A - The minimum bound on the function to be minimized
B - The maximum bound on the function to be minimized
RESULT:
The minimum value
MODIFICATION HISTORY
2018/11/13 -- Written by Jason Eastman, CfA
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/exofast.gettt.bak.pro)</STRONG><P>
<HR>
<A NAME="CALCB[2]">
<H2>CALCB[2]</H2></A>
<A HREF="#CALCB[1]">[Previous Routine]</A>
<A HREF="#COMPARESTARS">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
CALCB
PURPOSE:
Calculates the impact parameter of a given time. The function to minimize
Implementation translated from here:
https://en.wikipedia.org/wiki/Golden-section_search
CALLING SEQUENCE:
min = goldenratio('func', min, max)
INPUTS:
FUNC - A string specifying the name of the function to be
minimized
A - The minimum bound on the function to be minimized
B - The maximum bound on the function to be minimized
RESULT:
The minimum value
MODIFICATION HISTORY
2018/11/13 -- Written by Jason Eastman, CfA
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/exofast_gettt.pro)</STRONG><P>
<HR>
<A NAME="COMPARESTARS">
<H2>COMPARESTARS</H2></A>
<A HREF="#CALCB[2]">[Previous Routine]</A>
<A HREF="#COMPARESTARS_CORNER[1]">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
COMPARESTARS
PURPOSE:
Compares the stellar parameters of several different fits using
the IDL save files as output by exofastv2.pro.
CALLING SEQUENCE:
comparestars, 'savpath' [,TAGS=,PSNAME=]
INPUTS:
SAVPATH - A string resolved by file_search to specify the names of
all the idl save files to compare.
TAGS - A string array specifying the tagnames (parameters) to
compare. Default is
['mstar','rstar','rhostar','logg','teff','feh','initfeh','age','lstar','eep']
PSNAME - A string specifying the name of the postscript file to
output. If not specified, the plots are made to the screen.
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/comparestars.pro)</STRONG><P>
<HR>
<A NAME="COMPARESTARS_CORNER[1]">
<H2>COMPARESTARS_CORNER[1]</H2></A>
<A HREF="#COMPARESTARS">[Previous Routine]</A>
<A HREF="#COMPARESTARS_CORNER[2]">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
COMPARESTARS_CORNER
PURPOSE:
Creates a corner plot of several different fits overlaid on top
of each other using the IDL save files as output by exofastv2.pro.
CALLING SEQUENCE:
comparestars, 'savpath' [,TAGS=,LATEXNAMES=,LEGENDTXT=,PSNAME=]
INPUTS:
SAVPATH - A string resolved by file_search or an array of
filenames specifying the names of all the idl save
files to compare.
See NSAMPLE if files are large
TAGS - A string array specifying the tagnames (parameters) to
compare. Default is
['mstar','rstar','rhostar','logg','teff','feh','initfeh','age','lstar','eep']
LATEXNAMES - A string array specifying the textoidl axis labels
that corresponds to each of the tags above. If not the
same length as TAGS, it will use the structure's latex
property, but that doesn't always look pretty in
textoidl. Empty strings will use the the structure's
latex property.
PSNAME - A string specifying the name of the postscript file to
output. If not specified, the plots are made to the
screen.
LEGENDTXT - A string array corresponding to each save file that
specifies the legend txt. Default is the filenames.
NSAMPLE - A scalar that specifies how many (random) samples to
take from each parameter. Default uses all. Useful for
memory management if plotting data from many large files
POSITION - A 2-element array specifying the normalized X and Y
coordinates of the top left corner of the legend
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/comparestars_corner.pro)</STRONG><P>
<HR>
<A NAME="COMPARESTARS_CORNER[2]">
<H2>COMPARESTARS_CORNER[2]</H2></A>
<A HREF="#COMPARESTARS_CORNER[1]">[Previous Routine]</A>
<A HREF="#CONVERT_TRANSIT_TIMES">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
COMPARESTARS_CORNER
PURPOSE:
Creates a corner plot of several different fits overlaid on top
of each other using the IDL save files as output by exofastv2.pro.
CALLING SEQUENCE:
comparestars, 'savpath' [,TAGS=,LATEXNAMES=,LEGENDTXT=,PSNAME=]
INPUTS:
SAVPATH - A string resolved by file_search or an array of
filenames specifying the names of all the idl save
files to compare.
NOTE: All of these will be loaded into memory at once,
and multiple large save files may crash
TAGS - A string array specifying the tagnames (parameters) to
compare. Default is
['mstar','rstar','rhostar','logg','teff','feh','initfeh','age','lstar','eep']
LATEXNAMES - A string array specifying the textoidl axis labels
that corresponds to each of the tags above. If not the
same length as TAGS, it will use the structure's latex
property, but that doesn't always look pretty in
textoidl. Empty strings will use the the structure's
latex property.
PSNAME - A string specifying the name of the postscript file to
output. If not specified, the plots are made to the
screen.
LEGENDTXT - A string array corresponding to each save file that
specifies the legend txt. Default is the filenames.
NSAMPLE - A scalar that specifies how many (random) samples to
take from each parameter. Default is all. Useful for
memory management if the input has many large files
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/comparestars_corner2.pro)</STRONG><P>
<HR>
<A NAME="CONVERT_TRANSIT_TIMES">
<H2>CONVERT_TRANSIT_TIMES</H2></A>
<A HREF="#COMPARESTARS_CORNER[2]">[Previous Routine]</A>
<A HREF="#CROSSREF">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
KEYWORDS:
By default, the code will convert from time of inferior
conjunction to time of minimum projected separation. The
following keywords can change the inputs and outputs.
TS_IN - Time of superior conjunction is the input time, time of
minimum projected separation at secondary eclipse is the
output
TE_IN - Time of minimum projected separation at secondary eclipse
is the input, time of superior conjunction is the output.
TT_IN - Time of minimum rojected separation at primary eclipse
is the input, time of inferior conjunction is the output.
Given one time, eccentricity, inclination, omega, and period, we
will return all other times:
TC - Time of inferior conjunction, commonly reported as the
transit time
TT - Time of minimum projected separation. This is the
intuitive definition of the transit time.
TS - Time of superior conjunction, commonly reported as the
secondary ecclipse time
TE - The time of minimum projected separation during secondary
eclipse.
TP - Time of periastron
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/convert_transit_times.pro)</STRONG><P>
<HR>
<A NAME="CROSSREF">
<H2>CROSSREF</H2></A>
<A HREF="#CONVERT_TRANSIT_TIMES">[Previous Routine]</A>
<A HREF="#ELLKE">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
CROSSREF
PURPOSE:
Finds the closest match to refra and refdec from an array of RAs
and Decs.
Modification
2018-04-12: Jason Eastman, CfA
Renamed, documented, and cleaned up for distribution with EXOFASTv2
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/mksed.pro)</STRONG><P>
<HR>
<A NAME="ELLKE">
<H2>ELLKE</H2></A>
<A HREF="#CROSSREF">[Previous Routine]</A>
<A HREF="#ELLPIC_BULIRSCH">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
ELLKE
PURPOSE:
Computes Hasting's polynomial approximation for the complete
elliptic integral of the first (ek) and second (kk) kind. Combines
the calculation of both so as not to duplicate the expensive
calculation of alog10(1-k^2).
CALLING SEQUENCE:
ellke, k, ek, kk
INPUTS:
k - The elliptic modulus.
OUTPUTS:
ek - The elliptic integral of the first kind
kk - The elliptic integral of the second kind
MODIFICATION HISTORY
2009/04/06 -- Written by Jason Eastman (Ohio State University)
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/ellke.pro)</STRONG><P>
<HR>
<A NAME="ELLPIC_BULIRSCH">
<H2>ELLPIC_BULIRSCH</H2></A>
<A HREF="#ELLKE">[Previous Routine]</A>
<A HREF="#EXOFASTV2">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
ELLPIC_BULIRSCH
PURPOSE:
Computes the complete elliptical integral of the third kind using
the algorithm of Bulirsch (1965):
Bulirsch 1965, Numerische Mathematik, 7, 78
Bulirsch 1965, Numerische Mathematik, 7, 353
CALLING SEQUENCE:
result = ellpic_bulirsch(n, k)
INPUTS:
n,k - int(dtheta/((1-n*sin(theta)^2)*sqrt(1-k^2*sin(theta)^2)),0, pi/2)
RESULT:
The complete elliptical integral of the third kind
MODIFICATION HISTORY
2009/03 -- Written by Eric Agol
</PRE><P>
<STRONG>(See /home/jeastman/old_home/scratch/EXOFASTv2/ellpic_bulirsch.pro)</STRONG><P>
<HR>
<A NAME="EXOFASTV2">
<H2>EXOFASTV2</H2></A>
<A HREF="#ELLPIC_BULIRSCH">[Previous Routine]</A>
<A HREF="#EXOFAST_AMOEBA">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
EXOFASTv2
PURPOSE:
This is the high-level code for EXOFASTv2 to perform global
models for exoplanetary systems.
Please cite Eastman et al., 2019
(https://arxiv.org/abs/1907.09480) if you make use of this routine
in your research.
Report errors or bugs to jason.eastman@cfa.harvard.edu
CALLING SEQUENCE:
exofastv2, PRIORFILE= [RVPATH=, TRANPATH=, FLUXFILE=, PREFIX=,
/CIRCULAR, NTHIN=, MAXSTEPS=, /DEBUG, RANDOMFUNC=,
SEED=, /SPECPRIORS, /BESTONLY, NINTERP=, EXPTIME=,
/LONGCADENCE]
INPUTS:
PRIORFILE - An ASCII file with each line containing 2-6 white
space delimited columns:
NAME VALUE WIDTH LOWERLIMIT UPPERLIMIT STARTING_VALUE
NAME: must match a parameter.label. If in an array
(e.g., of planets), add "_i", where "i" is the
zero-indexed index into the array.
VALUE: If less than 6 columns are supplied, this is
the starting point of the fit. If this is the last
value specified, this only changes the starting point
and no prior is applied. If WIDTH is specified, this
is the mean of the gaussian prior.
WIDTH: Standard deviation of a Gaussian prior. If
negative, it is ignored (no Gaussian prior). If zero,
the parameter is fixed to VALUE.
LOWERLIMIT: Lower bound of a uniform prior. If -Inf,
it is ignored.
UPPERLIMIT: Upper bound of a uniform prior. If Inf,
it is ignored.
STARTING_VALUE: If specified, the fit will start here
regardless of the Gaussian prior
See
$EXOFAST_PATH/parnames.README for a detailed
explanation of this file and $EXOFAST_PATH/examples/
for templates to use.
PREFIX - Each of the output files will have this string as a
prefix. You can specify an absolute or relative
path. If the directories do not exist, they will be
created. The default is 'fitresults/planet.' to put
all outputs in a fitresults subdirectory.
DATA FILE INPUTS
RVPATH - A string specifying the path to the RV data
file(s). Wildcards are allowed for multiple files
(e.g., '*.rv'). Each file must have at least 3
columns:
1) Time (BJD_TDB -- See Eastman et al., 2010)
2) RV (m/s)
3) err (m/s)
If additional columns are supplied, they will be
detrended against.
The filenames of the RV data files *should* adhere
to a certain format:
planet_name.telescope.whateveryouwant.
"telescope" is used as the legend text in figures
and as header entries in the table.
NOTE 1: The units must be as specified, or the fit
will be wrong or fail.
NOTE 2: Other input time stamps will likely not
break the code, but can introduce errors in the
reported times of more than a minute. The output
table will display BJD_TDB but makes no attempt to
convert input times. See
http://adsabs.harvard.edu/abs/2010PASP..122..935E
for an explanation of times
NOTE 3: If RVPATH is omitted, no RV model will be
generated.
TRANPATH - A string specifying the path to the transit data
file(s). Wildcards are allowed for multiple files
(e.g., '*.dat'). Each file must have at least 3
columns:
1) Time (BJD_TDB -- See Eastman et al., 2010)
2) Normalized flux
3) err
4) Detrend parameter 1
....
N+3) Detrend parameter N
An optional header specifies which parameters
should be multiplicatively detrended and which
should be additively detrended. Without a header,
all detrending parameters are additively detrended.
The first character in the header line must be
"#". It must have whitespace delimited columns
corresponding to the data. Each multiplicative
detrending variable is preceeded with "M" (case
sensitive). For example, the header line
#BJD_TDB FLUX ERR MAIRMASS SKY myval
Will fit a multiplicative detrending to the 4th
column (MAIRMASS) and an additive detrending to the
5th and 6th columns (SKY and myval).
The corresponding model will be:
model = (transit + C0*SKY + C1*myval)*(F0 + M0*MAIRMASS)
Where C0, C1, and M0 are fitted detrending
parameters, F0 is the normalization, and SKY,
motion, and MAIRMASS are vectors for each data point
to detrend against.
The names of the files describing the transits
*must* adhere to a certain format:
nYYYYMMDD.filtername.telescope.whateveryouwant.
nYYYYMMDD -- The UTC date of mid transit, where YYYY is
the year, MM is the month, and DD is the day. This
is only necessary if the data has a single
transit. This is used to label the transits in the
output plot.
filtername -- The name of the observed
filter. If NOCLARET is not set, the filter must be
among the following list:
Johnson/Cousins: 'U','B','V','R','I','J','H','K'
Sloan: 'Sloanu','Sloang','Sloanr','Sloani','Sloanz'
Kepler: 'Kepler'
CoRoT: 'CoRoT'
TESS: 'TESS'
Spitzer: 'Spit36','Spit45','Spit58','Spit80'
Stromgren: 'u','b','v','y'
This is used to define the limb darkening for the
transit, dilution, and secondary depth
parameters.
NOTE: If NOCLARET is set, you may specify anything
here. If a number where "." is replaced with "_", it
will be interpreted as a wavelength in microns. If
TDELTAVS is also set, a plot of depth vs wavelength
will be created for transmission spectroscopy.
telescope -- a description of the telescope used for
the observations. Anything is allowed, but all
observations observed with the same telescope should
have the same name. This is used in the output plot
and color codes the TTV plot.
whateveryouwant -- any string you want to
include for it to make sense to you. This is not
used by the code.
So a transit taken on UTC 2017-01-27 with MINERVA in
the V band would be "n20170127.V.MINERVA.dat"
NOTE 2: The units must be as specified, or the fit
will be wrong or fail.
NOTE 3: Other input time stamps will likely not
break the code, but can introduce errors in the
reported times of more than a minute. The output
table will display BJD_TDB but makes no attempt to
convert input times. See
http://adsabs.harvard.edu/abs/2010PASP..122..935E
for an explanation of times
NOTE 4: If omitted, just the RV data will bit fit
*** Astrometry is not currently suppported or thoroughly tested. Future updates are likely to change the expected formats ***
ASTROMPATH - A string specifying the path to the astrometry data
file(s). Wildcards are allowed for multiple files
(e.g., '*.dat'). Each file must have 5 or 8 columns:
1) Time (BJD_TDB -- See Eastman et al., 2010)
2) RA (ICRS deg)
3) DEC (ICRS deg)
4) ra uncertainty (mas)
5) dec uncertainty (mas)
6) X position of observatory (AU from Solar System Barycenter)
7) Y position of observatory (AU from Solar System Barycenter)
8) Z position of observatory (AU from Solar System Barycenter)
The filename must adhere to a certain format:
epoch.location.whateveryouwant
epoch -- the reference epoch of the
observations in BJD_TDB (e.g., J2000 is
2451545).
location -- the location of the observatory. Only
"Earth" (geocenter), "Gaia" and "Hipparcos" are
understood, in which case the observatory position
(columns 6-8) will be calculated if not supplied.
whateveryouwant -- any string you want to include
for it to make sense to you. This is not used by the
code.
If supplied, EXOFASTv2 will fit the following
additional parameters: RA, Dec, PMRA, PMDEC, and
parallax, plus Omega for each planet. The
inclination will span the range from 0 to 180 (-1 <
cosi < 1).
DTPATH - The (optional) path to the Doppler Tomography fits
file(s). If supplied, the code will fit a vsini and
macro turbulence of the star, as well as a projected
spin-orbit alignment for each planet. This must be
used in conjunction with the FITDT, an NPLANETS array
specifying which planets should have their DT signal
modeled.
Each fits file is a 2D array describing all DT
observations during a single transit with extensions
describing the axes of the array. The pixel values of
the 2D array contain the fractional flux decrement at
a given BJD_TDB (spectrum) and velocity (pixel value
of the CCF). The first extension should specify the
BJD_TDB corresponding to each Y pixel and the second
extension should specify the velocity corresponding
to each X pixel.
Such a file can be generated given the 2D array of
fractional flux decrements (DT), a time array
(BJD_TDB) and a velocity array (VEL, in km/s) like this:
writefits,'nYYYYMMDD.pname.instrument.resolution.fits',DT
writefits,'nYYYYMMDD.pname.instrument.resolution.fits',BJD_TDB, /append
writefits,'nYYYYMMDD.pname.instrument.resolution.fits',VEL, /append
The names of these files *must* adhere to a certain format:
nYYYYMMDD.pname.instrument.resolution.whateveryouwant.fits
nYYYYMMDD -- The UTC date of mid transit. This is
used to label the transits in the output plot.
pname -- The name of the planet, including the
letter for the planet order (e.g., KELT-24b)
instrument -- the name of the instrument used for
the observations. Anything is allowed, but all
observations observed with the same telescope should
have the same name. This is used in the labels.
resolution -- The R value of the instrument. This is
required to accurately model the DT signal and must
be correct.
whateveryouwant - any string you want to include (or
nothing) for it to make sense to you (e.g, target
name). This is not used by the code.
So a transit taken on UTC 2017-01-27 with the TRES
spectrograph (R=44000) would be called
"n20170127.TRES.44000.fits"
NOTE 0: When supplied this way, the DT data does not
constrain vsini. A gaussian prior must be given in
the prior file.
NOTE 1: NAXIS1 must equal the number of velocities and
NAXIS2 must equal the number of times.
NOTE 2: Not using BJD_TDB time stamps will likely
not break the code, but can introduce errors in the
reported times of more than a minute or cause
internal inconsistencies if different data sets use
different timestamps. The output table will display
BJD_TDB but makes no attempt to convert or reconcile
input times between data sets.
See
http://adsabs.harvard.edu/abs/2010PASP..122..935E
for an explanation of times
NOTE 3: If DTPATH is omitted, Doppler Tomography is
not included in the global fit
SED MODEL INPUTS:
FLUXFILE - An ASCII file with each line containing 3-5 white
space delimited columns:
FILTER MAG UNCERTAINTY CATALOG_UNCERTAINTY STARNDX
FILTER: The filter name. See
$EXOFAST_PATH/sed/mist/filternames2.txt for
a complete list of allowed filters.
MAG: The apparent magnitude in the specified filter
UNCERTAINTY: The uncertainty in the apparent magnitude
CATALOG_UNCERTAINTY: Often catalog errors ignore
systematic error. This is the catalog error for
reference, but is ignored.
STARNDX: The index of the star(s) this magnitude
corresponds to. Multiple stars can be specified as a
comma delimited list (e.g., "0,1"). Differential
magnitudes can be specified with a "-" (e.g.,
"2-0,1"). This is ignored when the FLUXFILE model.
NOTE: a parallax prior should be specified or the SED
model will simply determine a photometric parallax.
$EXOFAST_PATH/mkticsed.pro will automatically
generate this file using queryVizier to query trusted
catalogs with appropriate systematic error floors
based on the object's name or coordinates. Exercise
caution that the correct object was selected for each
catalog.
The FLUXFILE SED model assumes top hat filter
profiles to sum NEXTGEN stellar atmospheres. It does
not support Gaia bands, multiple stars, differential
photometry, or spectrophotometry. It is no longer
recommended for general use but is left for
comparison.
MISTSEDFILE - Same as FLUXFILE, but uses the MIST bolometric
correction tables based on the C3K atmospheric
grids. Supports multiple stars and differential
photometry, and a much wider range of filters, but
not spectrophotometry.
SEDFILE - Same as FLUXFILE, but uses detailed filter profiles
to determine the model flux. The user can supply
their own filter profiles or generate any from SVO
using
$EXOFAST_PATH/sed/filtercurves/getfilter.pro. This
model supports multiple stars, differential
photometry, and spectrophotometry.
SPECPHOTPATH- The path to spectrophotometry files. Can only be used
in conjunction with the SEDFILE SED model.