Giter VIP home page Giter VIP logo

Comments (9)

scottransom avatar scottransom commented on September 4, 2024 3

You just found a bug! This happens (only, I think) when writing out subbands when you don't specify -numout (since prepsubband tries to set a good numout automatically now). If you specify -numout to be a multiple of "Spectra/subint = 2400" that is smaller than the number of raw data points "Total points (N) = 531000", this should work without failing. For instance, try it with -numout 525600.

I'll try to fix this bug ASAP. Thanks!

from presto.

mherreral avatar mherreral commented on September 4, 2024

I'll try it, thank you!

from presto.

mherreral avatar mherreral commented on September 4, 2024

That works like a charm for me, thank you!

from presto.

scottransom avatar scottransom commented on September 4, 2024

I think I just fixed this bug in the master branch. You shouldn't need the -numout anymore. Please let me know if you do!

from presto.

Tom111-lhx avatar Tom111-lhx commented on September 4, 2024

I tried your latest presto yesterday,but the problem still exists. my command is :python GBT_Lband_RSR.fil pipeline.py. Here are the error:
Data points written: 525600
Error in chkfopen(): No such file or directory

from presto.

Tom111-lhx avatar Tom111-lhx commented on September 4, 2024

Pulsar Subband De-dispersion Routine
by Scott M. Ransom

Assuming the data are SIGPROC filterbank format...
Reading SIGPROC filterbank data from 1 file:
'../GBT_Lband_PSR.fil'

Number of files = 1
   Num of polns = 2 (summed)

Center freq (MHz) = 1400
Num of channels = 96
Sample time (s) = 7.2e-05
Spectra/subint = 2400
Total points (N) = 531000
Total time (s) = 38.232
Clipping sigma = 6.000
Invert the band? = False
Byteswap? = False
Remove zeroDM? = False

File Start Spec Samples Padding Start MJD


1 0 531000 0 53010.48482638889254

Warning: You cannot (currently) barycenter subbands.
Setting the '-nobary' flag automatically.
Writing subbands to:
'Sband_DM5.75.sub00'
'Sband_DM5.75.sub01'
'Sband_DM5.75.sub02'
'Sband_DM5.75.sub03'
'Sband_DM5.75.sub04'
'Sband_DM5.75.sub05'
'Sband_DM5.75.sub06'
'Sband_DM5.75.sub07'
'Sband_DM5.75.sub08'
'Sband_DM5.75.sub09'
'Sband_DM5.75.sub10'
'Sband_DM5.75.sub11'
'Sband_DM5.75.sub12'
'Sband_DM5.75.sub13'
'Sband_DM5.75.sub14'
'Sband_DM5.75.sub15'
'Sband_DM5.75.sub16'
'Sband_DM5.75.sub17'
'Sband_DM5.75.sub18'
'Sband_DM5.75.sub19'
'Sband_DM5.75.sub20'
'Sband_DM5.75.sub21'
'Sband_DM5.75.sub22'
'Sband_DM5.75.sub23'
'Sband_DM5.75.sub24'
'Sband_DM5.75.sub25'
'Sband_DM5.75.sub26'
'Sband_DM5.75.sub27'
'Sband_DM5.75.sub28'
'Sband_DM5.75.sub29'
'Sband_DM5.75.sub30'
'Sband_DM5.75.sub31'

De-dispersing using:
Subbands = 32
Average DM = 5.75

Amount complete = 0%
Amount complete = 1%
Amount complete = 2%
Amount complete = 3%
Amount complete = 4%
Amount complete = 5%
Amount complete = 6%
Amount complete = 7%
Amount complete = 8%
Amount complete = 9%
Amount complete = 10%
Amount complete = 11%
Amount complete = 12%
Amount complete = 13%
Amount complete = 14%
Amount complete = 15%
Amount complete = 16%
Amount complete = 17%
Amount complete = 18%
Amount complete = 19%
Amount complete = 20%
Amount complete = 21%
Amount complete = 22%
Amount complete = 23%
Amount complete = 24%
Amount complete = 25%
Amount complete = 26%
Amount complete = 27%
Amount complete = 28%
Amount complete = 29%
Amount complete = 30%
Amount complete = 31%
Amount complete = 32%
Amount complete = 33%
Amount complete = 34%
Amount complete = 35%
Amount complete = 36%
Amount complete = 37%
Amount complete = 38%
Amount complete = 39%
Amount complete = 40%
Amount complete = 41%
Amount complete = 42%
Amount complete = 43%
Amount complete = 44%
Amount complete = 45%
Amount complete = 46%
Amount complete = 47%
Amount complete = 48%
Amount complete = 49%
Amount complete = 50%
Amount complete = 51%
Amount complete = 52%
Amount complete = 53%
Amount complete = 54%
Amount complete = 55%
Amount complete = 56%
Amount complete = 57%
Amount complete = 58%
Amount complete = 59%
Amount complete = 60%
Amount complete = 61%
Amount complete = 62%
Amount complete = 63%
Amount complete = 64%
Amount complete = 65%
Amount complete = 66%
Amount complete = 67%
Amount complete = 68%
Amount complete = 69%
Amount complete = 70%
Amount complete = 71%
Amount complete = 72%
Amount complete = 73%
Amount complete = 74%
Amount complete = 75%
Amount complete = 76%
Amount complete = 77%
Amount complete = 78%
Amount complete = 79%
Amount complete = 80%
Amount complete = 81%
Amount complete = 82%
Amount complete = 83%
Amount complete = 84%
Amount complete = 85%
Amount complete = 86%
Amount complete = 87%
Amount complete = 88%
Amount complete = 89%
Amount complete = 90%
Amount complete = 91%
Amount complete = 92%
Amount complete = 93%
Amount complete = 94%
Amount complete = 95%
Amount complete = 96%
Amount complete = 97%
Amount complete = 98%

Done.
Data points written: 525600

Error in chkfopen(): No such file or directory

from presto.

scottransom avatar scottransom commented on September 4, 2024

Hmmm. I can not reproduce that now. Can you please do a "ls -l which prepsubband" to see the date that prepsubband was compiled? And if that is recent, please check what the most recent commit was in $PRESTO (use "git log" and send me the first couple lines).

from presto.

Tom111-lhx avatar Tom111-lhx commented on September 4, 2024

I find that the first "perpsubband"command in pipeline.py have been solved, which is prepsubband -sub -subdm 5.75 -nsub 32 -downsamp 1 -o Sband ../GBT_Lband_PSR.fil However,the next command after it about prepsubband have something in trouble,it is prepsubband -nsub 32 -lodm 0.000000 -dmstep 0.500000 -numdms 24 -numout 531000 -downsamp 1 -o Sband Sband_DM5.75.sub[0-9]*
the pipline.py about these part are :
`cwd = os.getcwd()
try:
if not os.access('subbands', os.F_OK):
os.mkdir('subbands')
os.chdir('subbands')
logfile = open('dedisperse.log', 'wt')
for line in ddplan:
ddpl = line.split()
lowDM = float(ddpl[0])
hiDM = float(ddpl[1])
dDM = float(ddpl[2])
DownSamp = int(ddpl[3])
NDMs = int(ddpl[6])
calls = int(ddpl[7])
Nout = Nsamp/DownSamp
Nout -= (Nout % 500)
dmlist = np.split(np.arange(lowDM, hiDM, dDM), calls)

    #copy from $PRESTO/python/Dedisp.py
    subdownsamp = DownSamp/2
    datdownsamp = 2
    if DownSamp < 2: subdownsamp = datdownsamp = 1

    for i, dml in enumerate(dmlist):
        lodm = dml[0]
        subDM = np.mean(dml)
        if maskfile:
            prepsubband = "prepsubband -sub -subdm %.2f -nsub %d -downsamp %d -mask ../%s -o %s %s" % (subDM, Nsub, subdownsamp, maskfile, rootname, '../'+filename)
        else:
            prepsubband = "prepsubband -sub -subdm %.2f -nsub %d -downsamp %d -o %s %s" % (subDM, Nsub, subdownsamp, rootname, '../'+filename)
        print prepsubband
        output = getoutput(prepsubband)
        logfile.write(output)

        subnames = rootname+"_DM%.2f.sub[0-9]*" % subDM
        #prepsubcmd = "prepsubband -nsub %(Nsub)d -lodm %(lowdm)f -dmstep %(dDM)f -numdms %(NDMs)d -numout %(Nout)d -downsamp %(DownSamp)d -o %(root)s ../%(filfile)s" % {
                #'Nsub':Nsub, 'lowdm':lodm, 'dDM':dDM, 'NDMs':NDMs, 'Nout':Nout, 'DownSamp':datdownsamp, 'root':rootname, 'filfile':filename}
        prepsubcmd = "prepsubband -nsub %(Nsub)d -lodm %(lowdm)f -dmstep %(dDM)f -numdms %(NDMs)d -numout %(Nout)d -downsamp %(DownSamp)d -o %(root)s %(subfile)s" % {
                'Nsub':Nsub, 'lowdm':lodm, 'dDM':dDM, 'NDMs':NDMs, 'Nout':Nout, 'DownSamp':datdownsamp, 'root':rootname, 'subfile':subnames}
        print prepsubcmd
        output = getoutput(prepsubcmd)
        logfile.write(output)
os.system('rm *.sub*')
logfile.close()
os.chdir(cwd)

except:
print 'failed at prepsubband.'
os.chdir(cwd)
sys.exit(0)

print '''`

from presto.

Tom111-lhx avatar Tom111-lhx commented on September 4, 2024

here are the result in subbands/dedisperse.log
`De-dispersing using:
Subbands = 32
Average DM = 5.75

^MAmount complete = 0%^MAmount complete = 1%^MAmount complete = 2%^MAmount complete = 3%^MAmount complete = 4%^MAmount complete = 5%^MAmount complete = 6%^MAmount complete = 7%^MAmount complete = 8%^MAmount complete = 9%^MAmount complete = 10%^MAmount complete = 11%^MAmount complete = 12%^MAmount complete = 13%^MAmount complete = 14%^MAmount complete = 15%^MAmount complete = 16%^MAmount complete = 17%^MAmount complete = 18%^MAmount complete = 19%^MAmount complete = 20%^MAmount complete = 21%^MAmount complete = 22%^MAmount complete = 23%^MAmount complete = 24%^MAmount complete = 25%^MAmount complete = 26%^MAmount complete = 27%^MAmount complete = 28%^MAmount complete = 29%^MAmount complete = 30%^MAmount complete = 31%^MAmount complete = 32%^MAmount complete = 33%^MAmount complete = 34%^MAmount complete = 35%^MAmount complete = 36%^MAmount complete = 37%^MAmount complete = 38%^MAmount complete = 39%^MAmount complete = 40%^MAmount complete = 41%^MAmount complete = 42%^MAmount complete = 43%^MAmount complete = 44%^MAmount complete = 45%^MAmount complete = 46%^MAmount complete = 47%^MAmount complete = 48%^MAmount complete = 49%^MAmount complete = 50%^MAmount complete = 51%^MAmount complete = 52%^MAmount complete = 53%^MAmount complete = 54%^MAmount complete = 55%^MAmount complete = 56%^MAmount complete = 57%^MAmount complete = 58%^MAmount complete = 59%^MAmount complete = 60%^MAmount complete = 61%^MAmount complete = 62%^MAmount complete = 63%^MAmount complete = 64%^MAmount complete = 65%^MAmount complete = 66%^MAmount complete = 67%^MAmount complete = 68%^MAmount complete = 69%^MAmount complete = 70%^MAmount complete = 71%^MAmount complete = 72%^MAmount complete = 73%^MAmount complete = 74%^MAmount complete = 75%^MAmount complete = 76%^MAmount complete = 77%^MAmount complete = 78%^MAmount complete = 79%^MAmount complete = 80%^MAmount complete = 81%^MAmount complete = 82%^MAmount complete = 83%^MAmount complete = 84%^MAmount complete = 85%^MAmount complete = 86%^MAmount complete = 87%^MAmount complete = 88%^MAmount complete = 89%^MAmount complete = 90%^MAmount complete = 91%^MAmount complete = 92%^MAmount complete = 93%^MAmount complete = 94%^MAmount complete = 95%^MAmount complete = 96%^MAmount complete = 97%
Error in chkfopen(): No such file or directory
path = 'Sband_DM5.75.dat'
Error in chkfopen(): No such file or directory`

from presto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.