this is a small MAtLab script that download the ARASBeAm daily file with Be stars and their priority, then it creates an "Object to observe" list for PRISM. May be useful if you use MatLab & PRISM and want to observe Be stars...

Code: Select all
% ARASBeAm.m
%
% Query ARASBeAm Robot file and part it into PRISM v10 format
%
% v1.0 / 20160909 - first published
%
% Tested with MatLab2016a
% (c) Olivier Thizy
%
clear all;
% Get Robot file from ARASBeAm web server
URL = sprintf('http://arasbeam.free.fr/robot/ObsC2A.txt');
options = weboptions('Timeout',10);
Str = webread(URL);
CR = sprintf('\n'); % Carriage Return / each line is separated by a CR character...
LineEnd = strfind(Str,CR); % Find each end of line
% Parse data from URL content
for jj = 2:(size(LineEnd,2)-1) % Skip the first two lines...
Name{jj-1} = strtrim(Str((LineEnd(jj)+1):((LineEnd(jj)+15))));
HD{jj-1} = strtrim(Str((LineEnd(jj)+16):((LineEnd(jj)+23))));
RA{jj-1} = strtrim(Str((LineEnd(jj)+24):((LineEnd(jj)+37))));
Dec{jj-1} = strtrim(Str((LineEnd(jj)+38):((LineEnd(jj)+51))));
Mag{jj-1} = strtrim(Str((LineEnd(jj)+52):((LineEnd(jj)+59))));
ObsDate{jj-1} = strtrim(Str((LineEnd(jj)+60):((LineEnd(jj)+70))));
ObsTime{jj-1} = strtrim(Str((LineEnd(jj)+71):((LineEnd(jj)+81))));
Prio{jj-1} = strtrim(Str((LineEnd(jj)+82):((LineEnd(jj)+82))));
Freq{jj-1} = str2num(strtrim(Str((LineEnd(jj)+90):((LineEnd(jj+1))))));
end
% Open the 'LST' txt file to write in
FileName= sprintf('%s_BeSS.lst',datestr(now(),'yyyymmdd'));
FileID=fopen(FileName, 'wt');
% Write each line
NbStars = size(Name,2);
EndOfLine = sprintf('\n');
for jj = 1:NbStars % Skip the first two lines...
fprintf(FileID,'"P%s %s" %sh%sm%s0s %s°%s''%s0'''' %s FALSE "prio: %s (%d%%: %dd/%dd)"%s',Prio{jj},Name{jj},RA{jj}(2:3),RA{jj}(5:6),RA{jj}(8:11),Dec{jj}(1:3),Dec{jj}(5:6),Dec{jj}(8:11),Mag{jj},Prio{jj},int16((now()-datenum(ObsDate{jj}))*100.0/Freq{jj}),int16((now()-datenum(ObsDate{jj}))),Freq{jj},EndOfLine);
end
% Close file
fclose(FileID);
% That's all folks!
Cordialement,
Olivier Thizy