def get_total_obs_num_samples(obs_length=None, 
                              num_blocks=None, 
                              length_mode='obs_length',
                              num_antennas=1,
                              sample_rate=3e9,
                              block_size=134217728,
                              num_bits=8,
                              num_pols=2,
                              num_branches=1024,
                              num_chans=64):
    """
    Calculate number of required real voltage time samples for as given `obs_length` or `num_blocks`, without directly 
    using a `RawVoltageBackend` object. 
    
    Parameters
    ----------
    obs_length : float, optional
        Length of observation in seconds, if in `obs_length` mode
    num_blocks : int, optional
        Number of data blocks to record, if in `num_blocks` mode
    length_mode : str, optional
        Mode for specifying length of observation, either `obs_length` in seconds or `num_blocks` in data blocks
    num_antennas : int
        Number of antennas
    sample_rate : float
        Sample rate in Hz
    block_size : int
        Block size used in recording GUPPI RAW files
    num_bits : int
        Number of bits in requantized data (for saving into file). Can be 8 or 4.
    num_pols : int
        Number of polarizations recorded
    num_branches : int
        Number of branches in polyphase filterbank 
    num_chans : int
        Number of coarse channels written to file
    
    Returns
    -------
    num_samples : int
        Number of samples
    """
    tbin = num_branches / sample_rate
    chan_bw = 1 / tbin
    bytes_per_sample = 2 * num_pols * num_bits / 8
    if length_mode == 'obs_length':
        if obs_length is None:
            raise ValueError("Value not given for 'obs_length'.")
        num_blocks = int(obs_length * chan_bw * num_antennas * num_chans * bytes_per_sample / block_size)
    elif length_mode == 'num_blocks':
        if num_blocks is None:
            raise ValueError("Value not given for 'num_blocks'.")
        pass
    else:
        raise ValueError("Invalid option given for 'length_mode'.")
    return num_blocks * int(block_size / (num_antennas * num_chans * bytes_per_sample)) * num_branches