forked from EranOfek/MAAT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup1.m
160 lines (128 loc) · 4.12 KB
/
startup1.m
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
%function startup(AddRem,ComputerPath)
% startup script
% Package: null
% Description: matlab startup function and set the matlab default behaviour.
% This is including randomizing the seed of the matlab random
% number generator and setting the figures font defaults.
% Input : - Add or remove the astronomy & astrophysics matlab packages to
% the matlab path {1 - for add|0 - for remove}. Default is 1 (add).
% - Root Directory (check code for default).
% Output : null
% Tested : Matlab R2011a
% By : Eran O. Ofek Sep 1996
% URL : http://weizmann.ac.il/home/eofek/matlab/
% Example: startup('n'); % remove from the matlab path variable.
%--------------------------------------------------------------------------
%--- set envrinment variables ---
% Pickles spectra library - directory
setenv('imClass.specCl.get_Pickles.DataDir','~/matlab/data/spec/PicklesStellarSpec');
% filterCl database
setenv('imClass.filterCl.get','~/matlab/data/filters');
% env variables
setenv('mpDB_dir','/euler/eran/work/AsteroidsEphemDB');
% Assign variables to the matlab workspace
assignin('base','RAD',180./pi); % Radian
% set the plot AxesFontSize and AxesFontName default
set(0,'DefaultAxesFontSize',14);
set(0,'DefaultAxesFontName','times');
format short g
% randomizing the seed of the matlab random number generator
%rand('state',sum(100*clock));
rng('shuffle');
% Set the location of the functions and catalogs directories
%--- EDIT these lines ---
if (ismac || isunix)
% mac / unix
HomeDir = getenv('HOME');
else
% windows
HomeDir = getenv('HOMEPATH');
end
if (isempty(HomeDir))
error('Can not find home directory environment variable - edit the startup.m file accordingly');
end
BaseDir = 'matlab';
ComputerPath = sprintf('%s%s%s%s',HomeDir,filesep,BaseDir,filesep); % e.g., '/home/eran/matlab'
%---
%RunStartup = true; % set to false if you want to avoid running this file
%
ListDir = {'MAAT',...
'MAAT/FRT',...
'MAAT/Catalogue',...
'MAATn/external/matlab-json',...
'MAATn/imClass',...
'MAATn/LAST_ZWOASICamera',...
'MAATn/TimeDelay',...
'data',...
'data/BATSE_LC',...
'data/ELP',...
'data/SolarSystem',...
'data/VSOPE87'};
ListDirCats= {'2MASS',...
'2MASSxsc',...
'AAVSO_VSX',...
'AKARI',...
'APASS',...
'Cosmos',...
'CRTS_per_var',...
'DECaLS/DR5',...
'FIRST',...
'GAIA/DR1',...
'GAIA/DR2',...
'GALEX/DR6Plus7',...
'GLIMPSE',...
'HST/HSCv2',...
'IPHAS/DR2',...
'LAMOST/DR4',...
'NED/20180502',...
'NOAO',...
'NVSS',...
'PGC',...
'PS1',...
'PTFpc',...
'ROSATfsc',...
'SDSS/DR10',...
'SDSS/DR14offset',...
'Simbad_PM200',...
'SkyMapper',...
'SpecSDSS/DR14',...
'Spitzer/SAGE',...
'Spitzer/IRACgc',...
'SWIREz',...
'UCAC4',...
'UCACGAIADR2accel',...
'UKIDSS/DR10',...
'URAT1',...
'unWISE',...
'USNOB1',...
'VISTA/Viking/DR2',...
'VST/ATLAS/DR3',...
'VST/KiDS/DR3',...
'WISE',...
'XMM',...
'ZTF/LCDR1',...
'ZTF/SrcLCDR1',...
'ZTF/ztfDR1var'};
ListDir = strrep(ListDir,'/',filesep);
ListDirCats = strrep(ListDirCats,'/',filesep);
Add2path = ListDir;
for I=1:1:numel(ListDir)
Add2path{I} = sprintf('%s%s',ComputerPath,Add2path{I});
end
CatsPath = sprintf('/media/last/data1/catsHTM/');
Add2pathCats = ListDirCats;
for I=1:1:numel(ListDirCats)
Add2pathCats{I} = sprintf('%s%s',CatsPath,Add2pathCats{I});
end
addpath(Add2path{:});
addpath(Add2pathCats{:});
% startup the json package
json.startup
clear HomeDir
clear BaseDir
clear ComputerPath
clear CatsPath
clear ListDir
clear ListDirCats
clear Add2path
clear Add2pathCats