function orbitsize=findorbsz(filename)

info=hdfinfo(filename);

cnt=1;
cnt16b=cnt+15;

[ix,iy]=size(info.Attributes(7).Value);

while cnt~=iy
    if cnt16b<iy+1
        if char(info.Attributes(7).Value(cnt:cnt16b))=='OBJECT=OrbitSize'
            osindexB=cnt;
            osindexB2=cnt16b;
            break;
        else
            cnt=cnt+1;
            cnt16b=cnt+15;
        end
    end
end

cnt2=osindexB2;
cnt20b=cnt2+19;

while cnt2~=iy
    if cnt20b<iy+1
        if char(info.Attributes(7).Value(cnt2:cnt20b))=='END_OBJECT=OrbitSize'
            osindexE=cnt2;
            osindexE2=cnt20b;
            break;
        else
            cnt2=cnt2+1;
            cnt20b=cnt2+19;
        end
    end           
end

for osi=osindexB2:osindexE2
    if ~isempty(str2num(info.Attributes(7).Value(osi)))
        osizeB=osi;
        break;
    end
end
index=osizeB;
while ~isempty(str2num(info.Attributes(7).Value(index)))
  index=index+1;
    osizeE=index;
end
           
orbitsize=str2num(char(info.Attributes(7).Value(osizeB:(osizeE-1))));