def plot_15hr_selection():
    """make plots of the 15hr selection
    """
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15montecarlo.npy",
                       "reg15montecarlo",
                       "MC Selection",
                       cube_frame_dir + "reg15montecarlo",
                       sigmarange=None)
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15separable.npy",
                       "15hr_Wigglez_separable_selection", "# galaxies/pixel",
                       cube_frame_dir + "15hr_Wigglez_separable_selection")
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15selection.npy",
                       "15hr_Wigglez_selection", "# galaxies/pixel",
                       cube_frame_dir + "15hr_Wigglez_selection")

    pc.make_cube_movie("delta_selection.npy", "delta_selection",
                       "Difference in selection",
                       cube_frame_dir + "delta_selection")
    pc.make_cube_movie("reg15selection_est.npy",
                       "reg15selection_est",
                       "Full selection",
                       cube_frame_dir + "reg15selection_est",
                       sigmarange=None)
def plot_gbt_simset(fieldname, outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()

    #keyname = "%s" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    #keyname = "%s_beam" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    #keyname = "%s_beam_conv" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    keyname = "%s_beam_meansub" % fieldname
    filename = datapath_db.fetch(keyname, pick='0')
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_"+fieldname)

    keyname = "%s_beam_meansubconv" % fieldname
    filename = datapath_db.fetch(keyname, pick='0')
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_"+fieldname)
def plot_mode_amplitudes(mapkey, outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()
    map_cases = datapath_db.fileset_cases(mapkey, "pair;product;treatment")
    print map_cases
    for pair in map_cases['pair']:
        source_key = "db:%s:%s;modes;100modes" % (mapkey, pair)
        pc.make_cube_movie(source_key, "Mode amp", pc.cube_frame_dir,
                           sigmarange=-1, outputdir=outputdir, multiplier=1.,
                           transverse=False, convolve=False, logscale=True)
Example #4
0
def plot_individual(filename, outputdir="/cita/d/www/home/eswitzer/movies/"):
    pc.make_cube_movie(filename,
                       "Temperature (mK)",
                       pc.cube_frame_dir,
                       sigmarange=3.,
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False,
                       filetag_suffix="_simloss",
                       physical=True)
def plot_first_few_amps(dbitem, modelist):
    datapath_db = data_paths.DataPath()
    frame_dir = "/scratch/eswitzer/cube_frames/"

    dbname = "db:%s:A_with_B;modes;100modes" % dbitem

    for modeindex in modelist:
        filename = "%s_%d.eps" % (dbitem, modeindex)
        plot_cube.make_cube_movie(dbname,
                        "Amplitude", frame_dir,
                        saveslice=modeindex, saveslice_file=filename,
                        sigmarange=-1, multiplier=1.,
                        title="%s" % filename)
def plot_window(outputdir="/cita/d/www/home/eswitzer/movies/"):
    file1 = './observed_window.npy'
    file2 = './physical_window.npy'
    fieldname = '15hr'

    pc.make_cube_movie(file1, "Window", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname,
                        physical=True)
    pc.make_cube_movie(file2, "Window", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname,
                        physical=True)
def plot_manual(fieldname, outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()
    file2 = './physical_cube.npy'

    keyname = "simideal_%s_physical" % fieldname
    filename = datapath_db.fetch(keyname, pick='1')
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_"+fieldname,
                        physical=True)
    pc.make_cube_movie(file2, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_"+fieldname,
                        physical=True)
Example #8
0
def plot_mode_amplitudes(mapkey,
                         outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()
    map_cases = datapath_db.fileset_cases(mapkey, "pair;product;treatment")
    print map_cases
    for pair in map_cases['pair']:
        source_key = "db:%s:%s;modes;100modes" % (mapkey, pair)
        pc.make_cube_movie(source_key,
                           "Mode amp",
                           pc.cube_frame_dir,
                           sigmarange=-1,
                           outputdir=outputdir,
                           multiplier=1.,
                           transverse=False,
                           convolve=False,
                           logscale=True)
Example #9
0
def plot_first_few_amps(dbitem, modelist):
    datapath_db = data_paths.DataPath()
    frame_dir = "/scratch/eswitzer/cube_frames/"

    dbname = "db:%s:A_with_B;modes;100modes" % dbitem

    for modeindex in modelist:
        filename = "%s_%d.eps" % (dbitem, modeindex)
        plot_cube.make_cube_movie(dbname,
                                  "Amplitude",
                                  frame_dir,
                                  saveslice=modeindex,
                                  saveslice_file=filename,
                                  sigmarange=-1,
                                  multiplier=1.,
                                  title="%s" % filename)
Example #10
0
def plotting(filename, file_directory="/tmp/mufma/data/",
             title_name="Video", scale_name="Temperature(mK)",
             frame_directory="/tmp/mufma/data/", data_type="npy",
             output_directory="/cita/d/www/home/mufma/movies/",
             multiplier_num=1000.):
    r"""given a datafile plot a movie to www directory"""
    # TODO: determine how to specify title
    datapath_db = data_paths.DataPath()
    frame_dir = frame_directory
    given_tag = string.rstrip(filename, data_type)
    plot_cube.make_cube_movie(file_directory+filename, scale_name,
                              frame_dir,
                              sigmarange=[0., 0.5*10.**(11)],
                              multiplier=multiplier_num,
                              title=title_name,
                              outputdir=output_directory,
                              tag=given_tag)
Example #11
0
def save_and_plot(array, template, filename):
    array = algebra.make_vect(array, axis_names=('freq', 'ra', 'dec'))
    array.copy_axis_info(template)

    beam_data = sp.array([0.316148488246, 0.306805630985, 0.293729620792,
                 0.281176247549, 0.270856788455, 0.26745856078,
                 0.258910010848, 0.249188429031])
    freq_data = sp.array([695, 725, 755, 785, 815, 845, 875, 905],
                             dtype=float)
    freq_data *= 1.0e6

    beamobj = beam.GaussianBeam(beam_data, freq_data)
    array_beam = beamobj.apply(array)

    algebra.save(filename, array_beam)
    outputdir = "/cita/d/www/home/eswitzer/movies/"
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_trial")
Example #12
0
def plot_gbt_simset(fieldname, outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()

    #keyname = "%s" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    #keyname = "%s_beam" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    #keyname = "%s_beam_conv" % fieldname
    #filename = datapath_db.fetch(keyname, pick='0')
    #pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
    #                    sigmarange=3., outputdir=outputdir, multiplier=1000.,
    #                    transverse=False, filetag_suffix="_"+fieldname)

    keyname = "%s_beam_meansub" % fieldname
    filename = datapath_db.fetch(keyname, pick='0')
    pc.make_cube_movie(filename,
                       "Temperature (mK)",
                       pc.cube_frame_dir,
                       sigmarange=3.,
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)

    keyname = "%s_beam_meansubconv" % fieldname
    filename = datapath_db.fetch(keyname, pick='0')
    pc.make_cube_movie(filename,
                       "Temperature (mK)",
                       pc.cube_frame_dir,
                       sigmarange=3.,
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)
def plot_gbt_comb_modeset(map_key, outputdir="/cita/d/www/home/eswitzer/movies/",
                          convolve=False, divider_token=";"):
    datapath_db = data_paths.DataPath()
    input_fdb = datapath_db.fetch(map_key, intend_read=True, silent=True)

    map_treatments = []
    for filekey in input_fdb[0]:
        keyparse = filekey.split(divider_token)
        if len(keyparse) == 2:
            treatment = keyparse[-1]
            if "modes" in treatment:
                map_treatments.append(treatment)

    map_treatments = unique_list(map_treatments)

    for treatment in map_treatments:
        source_key = "db:%s:map;%s" % (map_key, treatment)
        print source_key, treatment
        pc.make_cube_movie(source_key, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, convolve=convolve)

        source_key = "db:%s:product;%s" % (map_key, treatment)
        pc.make_cube_movie(source_key, "Cleaned map times weights", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1000.,
                        transverse=False, convolve=convolve)

        source_key = "db:%s:weight;%s" % (map_key, treatment)
        pc.make_cube_movie(source_key, "inverse variance weight", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False)
Example #14
0
def plot_window(outputdir="/cita/d/www/home/eswitzer/movies/"):
    file1 = './observed_window.npy'
    file2 = './physical_window.npy'
    fieldname = '15hr'

    pc.make_cube_movie(file1,
                       "Window",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname,
                       physical=True)
    pc.make_cube_movie(file2,
                       "Window",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname,
                       physical=True)
def plot_wigglez(fieldname, outputdir="/cita/d/www/home/eswitzer/movies/",
                 complete=False):
    datapath_db = data_paths.DataPath()
    if complete:
        ctag = "complete_"
    else:
        ctag = ""

    db_key = "WiggleZ_%s_%sdelta_binned_data" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename, "counts", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname)

    db_key = "WiggleZ_%s_%sbinned_data" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename, "counts", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname)

    db_key = "WiggleZ_%s_%sselection" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename, "selection", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname)

    db_key = "WiggleZ_%s_%sseparable_selection" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename, "selection", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname)

    db_key = "WiggleZ_%s_%smontecarlo" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename, "selection", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1.,
                        transverse=False, filetag_suffix="_"+fieldname)
def plot_15hr_selection():
    """make plots of the 15hr selection
    """
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15montecarlo.npy",
                    "reg15montecarlo",
                    "MC Selection", cube_frame_dir + "reg15montecarlo",
                    sigmarange=None)
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15separable.npy",
                    "15hr_Wigglez_separable_selection",
                    "# galaxies/pixel", cube_frame_dir + "15hr_Wigglez_separable_selection")
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"
    pc.make_cube_movie(root_directory + "reg15selection.npy",
                    "15hr_Wigglez_selection",
                    "# galaxies/pixel", cube_frame_dir + "15hr_Wigglez_selection")

    pc.make_cube_movie("delta_selection.npy",
                    "delta_selection",
                    "Difference in selection", cube_frame_dir + "delta_selection")
    pc.make_cube_movie("reg15selection_est.npy",
                    "reg15selection_est",
                    "Full selection", cube_frame_dir + "reg15selection_est",
                    sigmarange=None)
Example #17
0
def plot_manual(fieldname, outputdir="/cita/d/www/home/eswitzer/movies/"):
    datapath_db = data_paths.DataPath()
    file2 = './physical_cube.npy'

    keyname = "simideal_%s_physical" % fieldname
    filename = datapath_db.fetch(keyname, pick='1')
    pc.make_cube_movie(filename,
                       "Temperature (mK)",
                       pc.cube_frame_dir,
                       sigmarange=3.,
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False,
                       filetag_suffix="_" + fieldname,
                       physical=True)
    pc.make_cube_movie(file2,
                       "Temperature (mK)",
                       pc.cube_frame_dir,
                       sigmarange=3.,
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False,
                       filetag_suffix="_" + fieldname,
                       physical=True)
Example #18
0
def plot_gbt_comb_modeset(map_key,
                          outputdir="/cita/d/www/home/eswitzer/movies/",
                          convolve=False,
                          divider_token=";"):
    datapath_db = data_paths.DataPath()
    input_fdb = datapath_db.fetch(map_key, intend_read=True, silent=True)

    map_treatments = []
    for filekey in input_fdb[0]:
        keyparse = filekey.split(divider_token)
        if len(keyparse) == 2:
            treatment = keyparse[-1]
            if "modes" in treatment:
                map_treatments.append(treatment)

    map_treatments = unique_list(map_treatments)

    for treatment in map_treatments:
        source_key = "db:%s:map;%s" % (map_key, treatment)
        print source_key, treatment
        pc.make_cube_movie(source_key,
                           "Temperature (mK)",
                           pc.cube_frame_dir,
                           sigmarange=3.,
                           outputdir=outputdir,
                           multiplier=1000.,
                           transverse=False,
                           convolve=convolve)

        source_key = "db:%s:product;%s" % (map_key, treatment)
        pc.make_cube_movie(source_key,
                           "Cleaned map times weights",
                           pc.cube_frame_dir,
                           sigmarange=-1,
                           outputdir=outputdir,
                           multiplier=1000.,
                           transverse=False,
                           convolve=convolve)

        source_key = "db:%s:weight;%s" % (map_key, treatment)
        pc.make_cube_movie(source_key,
                           "inverse variance weight",
                           pc.cube_frame_dir,
                           sigmarange=-1,
                           outputdir=outputdir,
                           multiplier=1.,
                           transverse=False)
def plot_15hr_selection():
    """make plots of the 22hr selection
    """
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"

    pc.make_cube_movie(root_directory + "reg22montecarlo.npy",
                    "reg22montecarlo",
                    "MC Selection", cube_frame_dir + "reg22montecarlo",
                    sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22selection.npy",
                    "reg22selection",
                    "Selection", cube_frame_dir + "reg22selection",
                    sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22separable.npy",
                    "reg22separable",
                    "Separable Selection", cube_frame_dir + "reg22separable",
                    sigmarange=None)
def plot_15hr_selection():
    """make plots of the 22hr selection
    """
    root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/binned_wiggleZ/"

    pc.make_cube_movie(root_directory + "reg22montecarlo.npy",
                       "reg22montecarlo",
                       "MC Selection",
                       cube_frame_dir + "reg22montecarlo",
                       sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22selection.npy",
                       "reg22selection",
                       "Selection",
                       cube_frame_dir + "reg22selection",
                       sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22separable.npy",
                       "reg22separable",
                       "Separable Selection",
                       cube_frame_dir + "reg22separable",
                       sigmarange=None)
                    sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22selection.npy",
                    "reg22selection",
                    "Selection", cube_frame_dir + "reg22selection",
                    sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22separable.npy",
                    "reg22separable",
                    "Separable Selection", cube_frame_dir + "reg22separable",
                    sigmarange=None)

# make plots of the 15hr field
root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/combined_maps/"
pc.make_cube_movie(root_directory + "combined_41-73_cleaned_clean_test.npy",
                "combined_41-73_cleaned_clean_test",
                "Temperature (mK)", cube_frame_dir + "combined_41-73_cleaned_clean_test",
                sigmarange=6., multiplier = 1000.)
pc.make_cube_movie(root_directory + "combined_41-73_cleaned_noise_inv_test.npy",
                "combined_41-73_cleaned_noise_inv_test",
                "Covariance", cube_frame_dir + "combined_41-73_cleaned_noise_inv_test",
                sigmarange=-1)

# make plots of the 22hr field
#root_directory = "/mnt/raid-project/gmrt/calinliv/wiggleZ/corr/84_ABCD_all_15_modes/"
root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/combined_maps/"
pc.make_cube_movie(root_directory + "combined_22hr_41-84_cleaned_clean.npy",
                "combined_22hr_41-84_cleaned_clean.npy",
                "Temperature (mK)", cube_frame_dir + "combined_22hr_41-84_cleaned_clean.npy",
                sigmarange=6, multiplier = 1000.)

pc.make_cube_movie(root_directory + "combined_22hr_41-84_cleaned_noise_inv.npy",
Example #22
0
    diagweight_file = "diag_noise_inv_weight.npy"

    # load the diag(N^-1)
    #noise_inv = algebra.make_mat(algebra.open_memmap(fullnoiseinv_file, mode='r'))
    #noise_inv_diag = noise_inv.mat_diag()
    #algebra.save(fullweight_file, noise_inv_diag)

    # load the diag(N) and take the inverse, write to disk
    #diag_noise = algebra.make_vect(algebra.load(diagnoise_file))
    #diag_noise_inv = 1./diag_noise
    #diag_noise_inv[diag_noise < 1.e-20] = 0.
    #algebra.save(diagweight_file, 1./diag_noise)

    # make movies of both
    outputdir = "/cita/d/www/home/eswitzer/movies/"
    pc.make_cube_movie(fullweight_file,
                       "Full N^-1",
                       pc.cube_frame_dir,
                       sigmarange=[0, 1e7],
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False)

    pc.make_cube_movie(diagweight_file,
                       "(diag N)^-1",
                       pc.cube_frame_dir,
                       sigmarange=[0, 1e7],
                       outputdir=outputdir,
                       multiplier=1000.,
                       transverse=False)
def plot_individual(filename, outputdir="/cita/d/www/home/eswitzer/movies/"):
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="_simloss",
                        physical=True)
                       "Selection",
                       cube_frame_dir + "reg22selection",
                       sigmarange=None)

    pc.make_cube_movie(root_directory + "reg22separable.npy",
                       "reg22separable",
                       "Separable Selection",
                       cube_frame_dir + "reg22separable",
                       sigmarange=None)


# make plots of the 15hr field
root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/combined_maps/"
pc.make_cube_movie(root_directory + "combined_41-73_cleaned_clean_test.npy",
                   "combined_41-73_cleaned_clean_test",
                   "Temperature (mK)",
                   cube_frame_dir + "combined_41-73_cleaned_clean_test",
                   sigmarange=6.,
                   multiplier=1000.)
pc.make_cube_movie(root_directory +
                   "combined_41-73_cleaned_noise_inv_test.npy",
                   "combined_41-73_cleaned_noise_inv_test",
                   "Covariance",
                   cube_frame_dir + "combined_41-73_cleaned_noise_inv_test",
                   sigmarange=-1)

# make plots of the 22hr field
#root_directory = "/mnt/raid-project/gmrt/calinliv/wiggleZ/corr/84_ABCD_all_15_modes/"
root_directory = "/mnt/raid-project/gmrt/eswitzer/wiggleZ/combined_maps/"
pc.make_cube_movie(root_directory + "combined_22hr_41-84_cleaned_clean.npy",
                   "combined_22hr_41-84_cleaned_clean.npy",
                   "Temperature (mK)",
Example #25
0
input_root = '/mnt/raid-project/gmrt/kiyo/gbt_out/maps/apr16.2012/'
fullpath_maplist = [ input_root + item for item in maplist] 

weightlist = ["sess_%d_calib_15hr_41-73_weight_I.npy" % item for item in live_sessions]
output_root = "/mnt/raid-project/gmrt/eswitzer/GBT/maps/self_calibrated_2/"
weightlist_fullpath = [ output_root + item for item in weightlist]

reference_clean = [input_root + "sess_most_calib_15hr_41-73_clean_map_I.npy"]
reference_weight = [output_root + "sess_most_calib_15hr_41-73_weight_I.npy"]

#for filename in weightlist_fullpath:
for filename in reference_weight:
    outputdir = "/cita/d/www/home/eswitzer/movies/"
    tag = ".".join(filename.split(".")[:-1])  # extract root name
    tag = tag.split("/")[-1]
    tag += "_v2"
    pc.make_cube_movie(filename, "Weight", pc.cube_frame_dir,
                        sigmarange=-1, outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="", tag=tag)

#for filename in fullpath_maplist:
for filename in reference_clean:
    outputdir = "/cita/d/www/home/eswitzer/movies/"
    tag = ".".join(filename.split(".")[:-1])  # extract root name
    tag = tag.split("/")[-1]
    tag += "_v2"
    pc.make_cube_movie(filename, "Temperature (mK)", pc.cube_frame_dir,
                        sigmarange=3., outputdir=outputdir, multiplier=1000.,
                        transverse=False, filetag_suffix="", tag=tag)

Example #26
0
from plotting import plot_cube as pc

if __name__ == '__main__':
    root = "/mnt/raid-project/gmrt/tcv/maps/"
    fullnoiseinv_file = root + "sec_A_15hr_41-90_noise_inv_I.npy"
    fullweight_file = "full_noise_inv_weight.npy"
    diagnoise_file = root + "sec_A_15hr_41-90_noise_diag_I.npy"
    diagweight_file = "diag_noise_inv_weight.npy"

    # load the diag(N^-1)
    #noise_inv = algebra.make_mat(algebra.open_memmap(fullnoiseinv_file, mode='r'))
    #noise_inv_diag = noise_inv.mat_diag()
    #algebra.save(fullweight_file, noise_inv_diag)

    # load the diag(N) and take the inverse, write to disk
    #diag_noise = algebra.make_vect(algebra.load(diagnoise_file))
    #diag_noise_inv = 1./diag_noise
    #diag_noise_inv[diag_noise < 1.e-20] = 0.
    #algebra.save(diagweight_file, 1./diag_noise)

    # make movies of both
    outputdir="/cita/d/www/home/eswitzer/movies/"
    pc.make_cube_movie(fullweight_file, "Full N^-1", pc.cube_frame_dir,
                        sigmarange=[0,1e7], outputdir=outputdir, multiplier=1000.,
                        transverse=False)

    pc.make_cube_movie(diagweight_file, "(diag N)^-1", pc.cube_frame_dir,
                        sigmarange=[0,1e7], outputdir=outputdir, multiplier=1000.,
                        transverse=False)

Example #27
0
def plot_wigglez(fieldname,
                 outputdir="/cita/d/www/home/eswitzer/movies/",
                 complete=False):
    datapath_db = data_paths.DataPath()
    if complete:
        ctag = "complete_"
    else:
        ctag = ""

    db_key = "WiggleZ_%s_%sdelta_binned_data" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename,
                       "counts",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)

    db_key = "WiggleZ_%s_%sbinned_data" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename,
                       "counts",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)

    db_key = "WiggleZ_%s_%sselection" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename,
                       "selection",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)

    db_key = "WiggleZ_%s_%sseparable_selection" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename,
                       "selection",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)

    db_key = "WiggleZ_%s_%smontecarlo" % (fieldname, ctag)
    filename = datapath_db.fetch(db_key)
    pc.make_cube_movie(filename,
                       "selection",
                       pc.cube_frame_dir,
                       sigmarange=-1,
                       outputdir=outputdir,
                       multiplier=1.,
                       transverse=False,
                       filetag_suffix="_" + fieldname)
#full_list = ["/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secA_1hr_41-90_clean_map_I_800.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secA_1hr_41-90_noise_weight_I_800.npy"]
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secA_1hr_41-90_noise_weight_I_800.npy"]
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secA_1hr_41-90_noise_weight_I_800.npy"]
#full_list = ["/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secB_1hr_41-90_noise_weight_I_800.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secC_1hr_41-90_noise_weight_I_800.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/1hr_oldcal_july16/secD_1hr_41-90_noise_weight_I_800.npy"]
#full_list = ["/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secA_15hr_41-90_clean_map_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secB_15hr_41-90_clean_map_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secC_15hr_41-90_clean_map_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secD_15hr_41-90_clean_map_I_all.npy",
#            "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secA_15hr_41-90_noise_inv_diag_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secB_15hr_41-90_noise_inv_diag_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secC_15hr_41-90_noise_inv_diag_I_all.npy",
#             "/mnt/raid-project/gmrt/eswitzer/GBT/maps/15hr_optimal_july11/secD_15hr_41-90_noise_inv_diag_I_all.npy"]

cbtitle = ""
multiplier = 1.
#sigmarange = -1.
sigmarange = 4.

for filename in full_list:
    outputdir = "/cita/d/www/home/eswitzer/movies/"
    tag = ".".join(filename.split(".")[:-1])  # extract root name
    tag = tag.split("/")[-1]
    pc.make_cube_movie(filename, cbtitle, pc.cube_frame_dir,
                        sigmarange=sigmarange, outputdir=outputdir,
                        multiplier=multiplier, logscale=False,
                        transverse=False, filetag_suffix="", tag=tag)

Example #29
0
    #                "Temperature (mK)", frame_dir,
    #                saveslice=127, saveslice_file="GBT_15hr_map_secA.eps",
    #                sigmarange=3., multiplier=1000.,
    #                title="GBT 15hr field (%(freq)3.1f MHz, z = %(redshift)3.3f)")

    #plot_cube.make_cube_movie("db:GBT_1hr_map_oldcalkiyo:A;clean_map",
    #                "Temperature (mK)", frame_dir,
    #                saveslice=127, saveslice_file="GBT_1hr_map_secA.eps",
    #                sigmarange=3., multiplier=1000.,
    #                title="GBT 1hr field (%(freq)3.1f MHz, z = %(redshift)3.3f)")

    plot_cube.make_cube_movie(
        "db:GBT_15hr_map_oldcal_cleaned_combined:map;20modes",
        "Temperature (mK)",
        frame_dir,
        saveslice=127,
        saveslice_file="cleaned_15hr_map_20modes.eps",
        sigmarange=0.4,
        multiplier=1000.,
        title="GBT 15hr field, cleaned (%(freq)3.1f MHz, z = %(redshift)3.3f)")

    plot_cube.make_cube_movie(
        "db:GBT_15hr_map_oldcal_cleaned_combined:map;20modes",
        "Temperature (mK)",
        frame_dir,
        saveslice=127,
        saveslice_file="cleaned_15hr_map_20modes_convolved.eps",
        convolve=True,
        sigmarange=0.4,
        multiplier=1000.,
        title=