Ejemplo n.º 1
0
    def textUpload(self, **kwargs):
        reader = []
        out = """<html><head><title>Detector Results!</title></head><body><h1>RESULT</h1> %s</body></html>"""
        try:
            filesUploaded = 0
            for f in kwargs['files']:
                reader.append([f.filename, f.file.read()])
                filesUploaded += 1
            result = multifile.multifile(reader)

        except IOError:
            result = "</br>Error"
            pass
        return out % (result)
Ejemplo n.º 2
0
    do_waterfall = True
    do_foldspec = True
    coherent_dedispersion = False

    # with open(file1, 'rb') as fh1:
    # with multifile('/mnt/aro/hdd2_node7/algonquin/sequence.2013-07-24T15:06:16.3.dat',
    #                ['/mnt/aro/hdd2_node7/algonquin/raw_voltage.2013-07-24T15:06:16.0.dat',
    #                 '/mnt/aro/hdd1_node7/algonquin/raw_voltage.2013-07-24T15:06:16.1.dat',
    #                 '/mnt/aro/hdd3_node7/algonquin/raw_voltage.2013-07-24T15:06:16.2.dat']) as fh1:
    #with multifile('/mnt/aro/hdd2_node7/algonquin/sequence.2013-07-27T16:55:17.3.dat',
    #               ['/mnt/aro/hdd2_node7/algonquin/raw_voltage.2013-07-27T16:55:17.0.dat',
    #                '/mnt/aro/hdd1_node7/algonquin/raw_voltage.2013-07-27T16:55:17.1.dat',
    #                '/mnt/aro/hdd3_node7/algonquin/raw_voltage.2013-07-27T16:55:17.2.dat']) as fh1:

    with multifile('/mnt/aro/hdd2_node2/algonquin/sequence.2013-07-26T18:31:14.3.dat',
                   ['/mnt/aro/hdd2_node2/algonquin/raw_voltage.2013-07-26T18:31:14.0.dat',
                    '/mnt/aro/hdd1_node2/algonquin/raw_voltage.2013-07-26T18:31:14.1.dat',
                    '/mnt/aro/hdd3_node2/algonquin/raw_voltage.2013-07-26T18:31:14.2.dat']) as fh1:

        foldspec2, waterfall = fold(fh1, '4bit', samplerate,
                                    fedge, fedge_at_top, nchan,
                                    nt, ntint, nhead,
                                    ngate, ntbin, ntw, dm, fref, phasepol,
                                    coherent=coherent_dedispersion,
                                    do_waterfall=do_waterfall,
                                    do_foldspec=do_foldspec,
                                    verbose=verbose, progress_interval=1)

    if do_waterfall:
        np.save("aro{}waterfall.npy".format(psr), waterfall)

    if do_foldspec:
Ejemplo n.º 3
0
    phasepol.window += (nhead * 2 / samplerate).to(u.second).value

    fedge = 200.0 * u.MHz
    fedge_at_top = True

    fref = 150.0 * u.MHz  # ref. freq. for dispersion measure

    time0 = Time(date_dict[psr], scale="utc") + TimeDelta(4 * 3600, format="sec")

    verbose = "very"
    do_waterfall = True
    do_foldspec = True
    dedisperse = "by-channel"

    # with open(file1, 'rb') as fh1:
    with multifile(seq_file, raw_files) as fh1:

        foldspec2, waterfall = fold(
            fh1,
            "4bit",
            samplerate,
            fedge,
            fedge_at_top,
            nchan,
            nt,
            ntint,
            nhead,
            ngate,
            ntbin,
            ntw,
            dm,
Ejemplo n.º 4
0
    fedge = 200. * u.MHz
    fedge_at_top = True

    fref = 150. * u.MHz  # ref. freq. for dispersion measure

    time0 = Time(date_dict[psr], scale='utc') + TimeDelta(4 * 3600,
                                                          format='sec')

    verbose = 'very'
    do_waterfall = True
    do_foldspec = True
    dedisperse = 'by-channel'

    #with open(file1, 'rb') as fh1:
    with multifile(seq_file, raw_files) as fh1:

        foldspec2, waterfall = fold(fh1,
                                    '4bit',
                                    samplerate,
                                    fedge,
                                    fedge_at_top,
                                    nchan,
                                    nt,
                                    ntint,
                                    nhead,
                                    ngate,
                                    ntbin,
                                    ntw,
                                    dm,
                                    fref,
Ejemplo n.º 5
0
    ntw = min(1000, nt * ntint)  # number of samples to combine for waterfall

    samplerate = 100 * u.MHz

    fedge = 350. * u.MHz
    fedge_at_top = True

    fref = 325. * u.MHz  # ref. freq. for dispersion measure

    verbose = True
    do_waterfall = True

    with multifile(
            '/scratch/aro/hdd2_node7/algonquin/sequence.0329_VLBI_june30.dat',
        [
            '/scratch/aro/hdd2_node7/algonquin/raw_voltage.0329_VLBI_june30.1.dat',
            '/scratch/aro/hdd1_node7/algonquin/raw_voltage.0329_VLBI_june30.2.dat',
            '/scratch/aro/hdd3_node7/algonquin/raw_voltage.0329_VLBI_june30.3.dat'
        ]) as fh1:
        foldspec2, waterfall = fold(fh1,
                                    np.int8,
                                    samplerate,
                                    fedge,
                                    fedge_at_top,
                                    nblock,
                                    nt,
                                    ntint,
                                    nhead,
                                    ngate,
                                    ntbin,
                                    ntw,
Ejemplo n.º 6
0
    ntw = min(1000, nt * ntint)  # number of samples to combine for waterfall

    samplerate = 100 * u.MHz

    fedge = 350.0 * u.MHz
    fedge_at_top = True

    fref = 325.0 * u.MHz  # ref. freq. for dispersion measure

    verbose = True
    do_waterfall = True

    with multifile(
        "/scratch/aro/hdd2_node7/algonquin/sequence.0329_VLBI_june30.dat",
        [
            "/scratch/aro/hdd2_node7/algonquin/raw_voltage.0329_VLBI_june30.1.dat",
            "/scratch/aro/hdd1_node7/algonquin/raw_voltage.0329_VLBI_june30.2.dat",
            "/scratch/aro/hdd3_node7/algonquin/raw_voltage.0329_VLBI_june30.3.dat",
        ],
    ) as fh1:
        foldspec2, waterfall = fold(
            fh1,
            np.int8,
            samplerate,
            fedge,
            fedge_at_top,
            nblock,
            nt,
            ntint,
            nhead,
            ngate,
            ntbin,