Thanks to redistricting, a special election here Tuesday promises to be one of the most confusing of the year.

The election will decide who will fill the remaining six months of George E. Danielson's congressional term. Danielson, a Democrat representing California's 30th district, retired from the House after being appointed to the California Court of Appeals.

Seeking to finish Danielson's term are Matthew G. (Marty) Martinez, 53, a Democrat who is now a member of the state Assembly, and Ralph R. Ramirez, 45, a Republican who is an insurance broker.

In the November general election, Martinez will run again as the Democratic nominee; his Republican opponent then will be not Ramirez, but Rep. John H. Rousselot, currently the incumbent in the 26th district.

The new lines for congressional districts drawn this year take effect in January, 1983, and put Rousselot into the 30th Congressional District. So Rousselot ran as the Republican nominee in the 30th district--the newly drawn 30th district--in the June 8 primary.

But Rousselot did not run in a separate special election, also June 8, to fill the remainder of Danielson's term. Rousselot did not run in the special, according to his press secretary, Patty Sheetz, because if he had won, he would have had to resign in the 26th district, which he did not think would be fair to his constituents.

So Martinez, a member of the state legislature, hopes to win the special election next Tuesday and thereby run as the incumbent against a current member of the House who can't run as an incumbent in his own district because it will no longer exist.

To add to the confusion, the Los Angeles Times reported after the June 8 primary that Martinez had won both the primary and special elections, and many people--including professional politicians--are not aware that a special election will take place Tuesday.

Martinez amassed more votes than his opponents in the special election but was forced into a runoff because he failed to get 51 percent of the vote.

Martinez, who believes that the outcome next Tuesday will be "very, very, very important" to his chances in November, claims that Ramirez is a "stalking horse" for Rousselot. Ramirez, conceding he is a longtime friend of Rousselot and would never run against him, says he's no stalking horse. Ramirez says he's only trying to build up name recognition for a race in 1984, when, he hopes, yet another redistricting will help him.

For his part, Ramirez claims that Martinez is a puppet for what is known in California as the Waxman-Berman machine, a reference to a coalition of mostly liberal, westside Los Angeles politicians headed by Congressman Henry A. Waxman and Assemblyman Howard Berman, who is almost certain to win election to Congress in November.

Martinez says he is no one's puppet.

Neither candidate has a clear advantage. The district, which is located in the San Gabriel Valley, has a 65 percent Democratic registration edge. But California Democrats tend to have a low voter turnout in special elections, and Ramirez has outspent Martinez by $10,000 in the past month.

The district is 53 percent Hispanic, but both candidates are Hispanic, too.

One certainty about this election is that it cannot be seen as a referendum on issues. Ramirez's campaign literature stresses that he has a college degree and Martinez does not. Martinez, asked what he saw as the most important issue in this campaign, replied: "Get out the vote."